Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Skip tests that rely on lastInsertId function.

  • Loading branch information...
commit 40104b8f54f28f2043084570674789db5f97d584 1 parent bc6f5da
Padraig O'Sullivan authored August 27, 2012
4  tests/Doctrine/Tests/DBAL/Functional/TemporaryTableTest.php
@@ -35,7 +35,7 @@ public function tearDown()
35 35
     public function testDropTemporaryTableNotAutoCommitTransaction()
36 36
     {
37 37
         $platform = $this->_conn->getDatabasePlatform();
38  
-        if ($platform->getName() == "akibansrv") {
  38
+        if ($platform->getName() === 'akibansrv') {
39 39
             $this->markTestSkipped('Akiban does not support temporary tables');
40 40
         }
41 41
         $columnDefinitions = array("id" => array("type" => Type::getType("integer"), "notnull" => true));
@@ -71,7 +71,7 @@ public function testDropTemporaryTableNotAutoCommitTransaction()
71 71
     public function testCreateTemporaryTableNotAutoCommitTransaction()
72 72
     {
73 73
         $platform = $this->_conn->getDatabasePlatform();
74  
-        if ($platform->getName() == "akibansrv") {
  74
+        if ($platform->getName() === 'akibansrv') {
75 75
             $this->markTestSkipped('Akiban does not support temporary tables');
76 76
         }
77 77
         $columnDefinitions = array("id" => array("type" => Type::getType("integer"), "notnull" => true));
8  tests/Doctrine/Tests/DBAL/Functional/WriteTest.php
@@ -140,6 +140,10 @@ public function testLastInsertId()
140 140
             $this->markTestSkipped('Test only works on platforms with identity columns.');
141 141
         }
142 142
 
  143
+        if ($platform->getName() === 'akibansrv') {
  144
+            $this->markTestSkipped('Akiban 1.4.0 does not support lastInsertId');
  145
+        }
  146
+
143 147
         $this->assertEquals(1, $this->_conn->insert('write_table', array('test_int' => 2, 'test_string' => 'bar')));
144 148
         $num = $this->_conn->lastInsertId();
145 149
 
@@ -153,6 +157,10 @@ public function testLastInsertIdSequence()
153 157
             $this->markTestSkipped('Test only works on platforms with sequences.');
154 158
         }
155 159
 
  160
+        if ($this->_conn->getDatabasePlatform()->getName() === 'akibansrv') {
  161
+            $this->markTestSkipped('Akiban 1.4.0 does not support lastInsertId');
  162
+        }
  163
+
156 164
         $sequence = new \Doctrine\DBAL\Schema\Sequence('write_table_id_seq');
157 165
         try {
158 166
             $this->_conn->getSchemaManager()->createSequence($sequence);

0 notes on commit 40104b8

Please sign in to comment.
Something went wrong with that request. Please try again.