Commit d4becf6b authored by František Bereň's avatar František Bereň Committed by lucasvanlierop

Update AbstractPostgreSqlPlatformTestCase.php

added postgresql platform conversion test
parent 1ae0bd89
...@@ -311,6 +311,23 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa ...@@ -311,6 +311,23 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa
$this->assertEquals('0', $platform->convertBooleans(false)); $this->assertEquals('0', $platform->convertBooleans(false));
} }
public function testConvertFromBoolean()
{
$platform = $this->createPlatform();
$this->assertFalse($platform->convertFromBoolean(false));
$this->assertFalse($platform->convertFromBoolean('false'));
$this->assertFalse($platform->convertFromBoolean('f'));
$this->assertFalse($platform->convertFromBoolean('no'));
$this->assertFalse($platform->convertFromBoolean('n'));
$this->assertFalse($platform->convertFromBoolean('0'));
$this->assertTrue($platform->convertFromBoolean(true));
$this->assertTrue($platform->convertFromBoolean('true'));
$this->assertTrue($platform->convertFromBoolean('t'));
$this->assertTrue($platform->convertFromBoolean('yes'));
$this->assertTrue($platform->convertFromBoolean('y'));
$this->assertTrue($platform->convertFromBoolean('1'));
}
public function testGetCreateSchemaSQL() public function testGetCreateSchemaSQL()
{ {
$schemaName = 'schema'; $schemaName = 'schema';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment