Permalink
Browse files

Skip tests that rely on lastInsertId function.

  • Loading branch information...
1 parent bc6f5da commit 40104b8f54f28f2043084570674789db5f97d584 @posulliv committed Aug 27, 2012
@@ -35,7 +35,7 @@ public function tearDown()
public function testDropTemporaryTableNotAutoCommitTransaction()
{
$platform = $this->_conn->getDatabasePlatform();
- if ($platform->getName() == "akibansrv") {
+ if ($platform->getName() === 'akibansrv') {
$this->markTestSkipped('Akiban does not support temporary tables');
}
$columnDefinitions = array("id" => array("type" => Type::getType("integer"), "notnull" => true));
@@ -71,7 +71,7 @@ public function testDropTemporaryTableNotAutoCommitTransaction()
public function testCreateTemporaryTableNotAutoCommitTransaction()
{
$platform = $this->_conn->getDatabasePlatform();
- if ($platform->getName() == "akibansrv") {
+ if ($platform->getName() === 'akibansrv') {
$this->markTestSkipped('Akiban does not support temporary tables');
}
$columnDefinitions = array("id" => array("type" => Type::getType("integer"), "notnull" => true));
@@ -140,6 +140,10 @@ public function testLastInsertId()
$this->markTestSkipped('Test only works on platforms with identity columns.');
}
+ if ($platform->getName() === 'akibansrv') {
+ $this->markTestSkipped('Akiban 1.4.0 does not support lastInsertId');
+ }
+
$this->assertEquals(1, $this->_conn->insert('write_table', array('test_int' => 2, 'test_string' => 'bar')));
$num = $this->_conn->lastInsertId();
@@ -153,6 +157,10 @@ public function testLastInsertIdSequence()
$this->markTestSkipped('Test only works on platforms with sequences.');
}
+ if ($this->_conn->getDatabasePlatform()->getName() === 'akibansrv') {
+ $this->markTestSkipped('Akiban 1.4.0 does not support lastInsertId');
+ }
+
$sequence = new \Doctrine\DBAL\Schema\Sequence('write_table_id_seq');
try {
$this->_conn->getSchemaManager()->createSequence($sequence);

0 comments on commit 40104b8

Please sign in to comment.