Commit c8ea13ac authored by Daniel Hensby's avatar Daniel Hensby Committed by Steve Müller

Proof of 2714

parent c41cc5a6
...@@ -24,5 +24,24 @@ class SequenceTest extends \Doctrine\Tests\DbalTestCase ...@@ -24,5 +24,24 @@ class SequenceTest extends \Doctrine\Tests\DbalTestCase
$this->assertFalse($sequence2->isAutoIncrementsFor($table)); $this->assertFalse($sequence2->isAutoIncrementsFor($table));
$this->assertFalse($sequence3->isAutoIncrementsFor($table)); $this->assertFalse($sequence3->isAutoIncrementsFor($table));
} }
public function testIsAutoincrementForCaseInsensitive()
{
$table = new Table('foo');
$table->addColumn('ID', 'integer', array('autoincrement' => true));
$table->setPrimaryKey(array('ID'));
$sequence = new Sequence("foo_id_seq");
$sequence1 = new Sequence("foo_ID_seq");
$sequence2 = new Sequence("bar_id_seq");
$sequence3 = new Sequence("bar_ID_seq");
$sequence4 = new Sequence("other.foo_id_seq");
$this->assertTrue($sequence->isAutoIncrementsFor($table));
$this->assertTrue($sequence1->isAutoIncrementsFor($table));
$this->assertFalse($sequence2->isAutoIncrementsFor($table));
$this->assertFalse($sequence3->isAutoIncrementsFor($table));
$this->assertFalse($sequence4->isAutoIncrementsFor($table));
}
} }
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