Commit 96ddf9e8 authored by Guilherme Blanco's avatar Guilherme Blanco

Added tests. Fixed underscore usage in new classes for methods and properties

parent de1f02b6
...@@ -48,7 +48,7 @@ class UniqueConstraint extends AbstractAsset implements Constraint ...@@ -48,7 +48,7 @@ class UniqueConstraint extends AbstractAsset implements Constraint
$this->options = $options; $this->options = $options;
foreach ($columns as $column) { foreach ($columns as $column) {
$this->_addColumn($column); $this->addColumn($column);
} }
foreach ($flags as $flag) { foreach ($flags as $flag) {
...@@ -167,7 +167,7 @@ class UniqueConstraint extends AbstractAsset implements Constraint ...@@ -167,7 +167,7 @@ class UniqueConstraint extends AbstractAsset implements Constraint
/** /**
* @return void * @return void
*/ */
protected function _addColumn(string $column) protected function addColumn(string $column) : void
{ {
$this->columns[$column] = new Identifier($column); $this->columns[$column] = new Identifier($column);
} }
......
...@@ -823,6 +823,16 @@ abstract class AbstractPlatformTestCase extends TestCase ...@@ -823,6 +823,16 @@ abstract class AbstractPlatformTestCase extends TestCase
self::assertFalse($this->platform->usesSequenceEmulatedIdentityColumns()); self::assertFalse($this->platform->usesSequenceEmulatedIdentityColumns());
} }
public function testGetSequencePrefixWithoutSchema() : void
{
self::assertEquals("foo", $this->platform->getSequencePrefix("foo"));
}
public function testGetSequencePrefixWithSchema() : void
{
self::assertEquals("bar.foo", $this->platform->getSequencePrefix("foo", "bar"));
}
/** /**
* @group DBAL-563 * @group DBAL-563
*/ */
......
...@@ -824,4 +824,9 @@ class SqlitePlatformTest extends AbstractPlatformTestCase ...@@ -824,4 +824,9 @@ class SqlitePlatformTest extends AbstractPlatformTestCase
'Column "no_collation" will use the default collation (BINARY) and "column_collation" overwrites the collation on this column' 'Column "no_collation" will use the default collation (BINARY) and "column_collation" overwrites the collation on this column'
); );
} }
public function testGetSequencePrefixWithSchema() : void
{
self::assertEquals("bar__foo", $this->platform->getSequencePrefix("foo", "bar"));
}
} }
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