Commit 93af1de1 authored by Adala Khaled's avatar Adala Khaled

Fixing method name 'rollBack'

parent 61e1f860
...@@ -48,7 +48,7 @@ class ConnectionTest extends \Doctrine\Tests\DbalTestCase ...@@ -48,7 +48,7 @@ class ConnectionTest extends \Doctrine\Tests\DbalTestCase
public function testRollbackWithNoActiveTransaction_ThrowsException() public function testRollbackWithNoActiveTransaction_ThrowsException()
{ {
$this->setExpectedException('Doctrine\DBAL\ConnectionException'); $this->setExpectedException('Doctrine\DBAL\ConnectionException');
$this->_conn->rollback(); $this->_conn->rollBack();
} }
public function testSetRollbackOnlyNoActiveTransaction_ThrowsException() public function testSetRollbackOnlyNoActiveTransaction_ThrowsException()
......
...@@ -45,7 +45,7 @@ class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -45,7 +45,7 @@ class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase
throw new \Exception; throw new \Exception;
$this->_conn->commit(); // never reached $this->_conn->commit(); // never reached
} catch (\Exception $e) { } catch (\Exception $e) {
$this->_conn->rollback(); $this->_conn->rollBack();
$this->assertEquals(1, $this->_conn->getTransactionNestingLevel()); $this->assertEquals(1, $this->_conn->getTransactionNestingLevel());
//no rethrow //no rethrow
} }
...@@ -55,7 +55,7 @@ class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -55,7 +55,7 @@ class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase
$this->fail('Transaction commit after failed nested transaction should fail.'); $this->fail('Transaction commit after failed nested transaction should fail.');
} catch (ConnectionException $e) { } catch (ConnectionException $e) {
$this->assertEquals(1, $this->_conn->getTransactionNestingLevel()); $this->assertEquals(1, $this->_conn->getTransactionNestingLevel());
$this->_conn->rollback(); $this->_conn->rollBack();
$this->assertEquals(0, $this->_conn->getTransactionNestingLevel()); $this->assertEquals(0, $this->_conn->getTransactionNestingLevel());
} }
} }
...@@ -81,7 +81,7 @@ class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -81,7 +81,7 @@ class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase
throw new \Exception; throw new \Exception;
$this->_conn->commit(); // never reached $this->_conn->commit(); // never reached
} catch (\Exception $e) { } catch (\Exception $e) {
$this->_conn->rollback(); $this->_conn->rollBack();
$this->assertEquals(1, $this->_conn->getTransactionNestingLevel()); $this->assertEquals(1, $this->_conn->getTransactionNestingLevel());
//no rethrow //no rethrow
} }
...@@ -95,7 +95,7 @@ class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -95,7 +95,7 @@ class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase
$this->_conn->commit(); // should not throw exception $this->_conn->commit(); // should not throw exception
} catch (ConnectionException $e) { } catch (ConnectionException $e) {
$this->fail('Transaction commit after failed nested transaction should not fail when using savepoints.'); $this->fail('Transaction commit after failed nested transaction should not fail when using savepoints.');
$this->_conn->rollback(); $this->_conn->rollBack();
} }
} }
...@@ -169,7 +169,7 @@ class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -169,7 +169,7 @@ class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase
$this->_conn->commit(); // never reached $this->_conn->commit(); // never reached
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertEquals(1, $this->_conn->getTransactionNestingLevel()); $this->assertEquals(1, $this->_conn->getTransactionNestingLevel());
$this->_conn->rollback(); $this->_conn->rollBack();
$this->assertEquals(0, $this->_conn->getTransactionNestingLevel()); $this->assertEquals(0, $this->_conn->getTransactionNestingLevel());
} }
} }
...@@ -181,7 +181,7 @@ class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -181,7 +181,7 @@ class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase
$this->assertEquals(1, $this->_conn->getTransactionNestingLevel()); $this->assertEquals(1, $this->_conn->getTransactionNestingLevel());
$this->_conn->commit(); $this->_conn->commit();
} catch (\Exception $e) { } catch (\Exception $e) {
$this->_conn->rollback(); $this->_conn->rollBack();
$this->assertEquals(0, $this->_conn->getTransactionNestingLevel()); $this->assertEquals(0, $this->_conn->getTransactionNestingLevel());
} }
......
...@@ -59,7 +59,7 @@ class TemporaryTableTest extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -59,7 +59,7 @@ class TemporaryTableTest extends \Doctrine\Tests\DbalFunctionalTestCase
$this->_conn->exec($platform->getDropTemporaryTableSQL($tempTable)); $this->_conn->exec($platform->getDropTemporaryTableSQL($tempTable));
$this->_conn->insert("nontemporary", array("id" => 2)); $this->_conn->insert("nontemporary", array("id" => 2));
$this->_conn->rollback(); $this->_conn->rollBack();
$rows = $this->_conn->fetchAll('SELECT * FROM nontemporary'); $rows = $this->_conn->fetchAll('SELECT * FROM nontemporary');
$this->assertEquals(array(), $rows, "In an event of an error this result has one row, because of an implicit commit."); $this->assertEquals(array(), $rows, "In an event of an error this result has one row, because of an implicit commit.");
...@@ -97,7 +97,7 @@ class TemporaryTableTest extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -97,7 +97,7 @@ class TemporaryTableTest extends \Doctrine\Tests\DbalFunctionalTestCase
$this->_conn->exec($createTempTableSQL); $this->_conn->exec($createTempTableSQL);
$this->_conn->insert("nontemporary", array("id" => 2)); $this->_conn->insert("nontemporary", array("id" => 2));
$this->_conn->rollback(); $this->_conn->rollBack();
try { try {
$this->_conn->exec($platform->getDropTemporaryTableSQL($tempTable)); $this->_conn->exec($platform->getDropTemporaryTableSQL($tempTable));
......
...@@ -31,7 +31,7 @@ class DBAL202Test extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -31,7 +31,7 @@ class DBAL202Test extends \Doctrine\Tests\DbalFunctionalTestCase
$stmt = $this->_conn->prepare('INSERT INTO DBAL202 VALUES (8)'); $stmt = $this->_conn->prepare('INSERT INTO DBAL202 VALUES (8)');
$this->_conn->beginTransaction(); $this->_conn->beginTransaction();
$stmt->execute(); $stmt->execute();
$this->_conn->rollback(); $this->_conn->rollBack();
$this->assertEquals(0, $this->_conn->query('SELECT COUNT(1) FROM DBAL202')->fetchColumn()); $this->assertEquals(0, $this->_conn->query('SELECT COUNT(1) FROM DBAL202')->fetchColumn());
} }
......
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