diff --git a/tests/Transaction/FirebirdTestCase.php b/tests/Transaction/FirebirdTestCase.php index 8840f2442..dc3f78831 100644 --- a/tests/Transaction/FirebirdTestCase.php +++ b/tests/Transaction/FirebirdTestCase.php @@ -1,25 +1,58 @@ . + */ + +/** + * Doctrine_Transaction_Firebird_TestCase + * + * @package Doctrine + * @author Konsta Vesterinen + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @category Object Relational Mapping + * @link www.phpdoctrine.com + * @since 1.0 + * @version $Revision$ + */ +class Doctrine_Transaction_Firebird_TestCase extends Doctrine_UnitTestCase +{ + public function testCreateSavePointExecutesSql() + { $this->transaction->beginTransaction('mypoint'); $this->assertEqual($this->adapter->pop(), 'SAVEPOINT mypoint'); } - public function testReleaseSavePointExecutesSql() { + public function testReleaseSavePointExecutesSql() + { $this->transaction->commit('mypoint'); $this->assertEqual($this->adapter->pop(), 'RELEASE SAVEPOINT mypoint'); } - public function testRollbackSavePointExecutesSql() { + public function testRollbackSavePointExecutesSql() + { $this->transaction->beginTransaction('mypoint'); $this->transaction->rollback('mypoint'); $this->assertEqual($this->adapter->pop(), 'ROLLBACK TO SAVEPOINT mypoint'); } - public function testSetIsolationThrowsExceptionOnUnknownIsolationMode() { + public function testSetIsolationThrowsExceptionOnUnknownIsolationMode() + { try { $this->transaction->setIsolation('unknown'); $this->fail(); @@ -27,7 +60,8 @@ class Doctrine_Transaction_Firebird_TestCase extends Doctrine_Driver_UnitTestCas $this->pass(); } } - public function testSetIsolationThrowsExceptionOnUnknownWaitMode() { + public function testSetIsolationThrowsExceptionOnUnknownWaitMode() + { try { $this->transaction->setIsolation('READ UNCOMMITTED', array('wait' => 'unknown')); $this->fail(); @@ -35,7 +69,8 @@ class Doctrine_Transaction_Firebird_TestCase extends Doctrine_Driver_UnitTestCas $this->pass(); } } - public function testSetIsolationThrowsExceptionOnUnknownReadWriteMode() { + public function testSetIsolationThrowsExceptionOnUnknownReadWriteMode() + { try { $this->transaction->setIsolation('READ UNCOMMITTED', array('rw' => 'unknown')); $this->fail(); @@ -43,7 +78,8 @@ class Doctrine_Transaction_Firebird_TestCase extends Doctrine_Driver_UnitTestCas $this->pass(); } } - public function testSetIsolationExecutesSql() { + public function testSetIsolationExecutesSql() + { $this->transaction->setIsolation('READ UNCOMMITTED'); $this->transaction->setIsolation('READ COMMITTED'); $this->transaction->setIsolation('REPEATABLE READ'); @@ -54,7 +90,8 @@ class Doctrine_Transaction_Firebird_TestCase extends Doctrine_Driver_UnitTestCas $this->assertEqual($this->adapter->pop(), 'SET TRANSACTION ISOLATION LEVEL READ COMMITTED NO RECORD_VERSION'); $this->assertEqual($this->adapter->pop(), 'SET TRANSACTION ISOLATION LEVEL READ COMMITTED RECORD_VERSION'); } - public function testSetIsolationSupportsReadWriteOptions() { + public function testSetIsolationSupportsReadWriteOptions() + { $this->transaction->setIsolation('SERIALIZABLE', array('rw' => 'READ ONLY')); $this->assertEqual($this->adapter->pop(), 'SET TRANSACTION READ ONLY ISOLATION LEVEL SNAPSHOT TABLE STABILITY'); @@ -63,7 +100,8 @@ class Doctrine_Transaction_Firebird_TestCase extends Doctrine_Driver_UnitTestCas $this->assertEqual($this->adapter->pop(), 'SET TRANSACTION READ WRITE ISOLATION LEVEL SNAPSHOT TABLE STABILITY'); } - public function testSetIsolationSupportsWaitOptions() { + public function testSetIsolationSupportsWaitOptions() + { $this->transaction->setIsolation('SERIALIZABLE', array('wait' => 'NO WAIT')); $this->assertEqual($this->adapter->pop(), 'SET TRANSACTION NO WAIT ISOLATION LEVEL SNAPSHOT TABLE STABILITY'); diff --git a/tests/Transaction/InformixTestCase.php b/tests/Transaction/InformixTestCase.php index a8c301124..b0b88e886 100644 --- a/tests/Transaction/InformixTestCase.php +++ b/tests/Transaction/InformixTestCase.php @@ -30,5 +30,6 @@ * @since 1.0 * @version $Revision$ */ -class Doctrine_Transaction_Informix_TestCase extends Doctrine_UnitTestCase { +class Doctrine_Transaction_Informix_TestCase extends Doctrine_UnitTestCase +{ } diff --git a/tests/Transaction/MssqlTestCase.php b/tests/Transaction/MssqlTestCase.php index ed176325f..bca3944be 100644 --- a/tests/Transaction/MssqlTestCase.php +++ b/tests/Transaction/MssqlTestCase.php @@ -1,9 +1,39 @@ . + */ + +/** + * Doctrine_Transaction_Firebird_TestCase + * + * @package Doctrine + * @author Konsta Vesterinen + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @category Object Relational Mapping + * @link www.phpdoctrine.com + * @since 1.0 + * @version $Revision$ + */ +class Doctrine_Transaction_Mssql_TestCase extends Doctrine_Driver_UnitTestCase +{ + public function testSetIsolationThrowsExceptionOnUnknownIsolationMode() + { try { $this->transaction->setIsolation('unknown'); $this->fail(); @@ -11,7 +41,8 @@ class Doctrine_Transaction_Mssql_TestCase extends Doctrine_Driver_UnitTestCase { $this->pass(); } } - public function testSetIsolationExecutesSql() { + public function testSetIsolationExecutesSql() + { $this->transaction->setIsolation('READ UNCOMMITTED'); $this->transaction->setIsolation('READ COMMITTED'); $this->transaction->setIsolation('REPEATABLE READ'); @@ -22,7 +53,8 @@ class Doctrine_Transaction_Mssql_TestCase extends Doctrine_Driver_UnitTestCase { $this->assertEqual($this->adapter->pop(), 'SET TRANSACTION ISOLATION LEVEL READ COMMITTED'); $this->assertEqual($this->adapter->pop(), 'SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED'); } - public function testSetIsolationSupportsSnapshotMode() { + public function testSetIsolationSupportsSnapshotMode() + { $this->transaction->setIsolation('SNAPSHOT'); $this->assertEqual($this->adapter->pop(), 'SET TRANSACTION ISOLATION LEVEL SNAPSHOT'); diff --git a/tests/Transaction/MysqlTestCase.php b/tests/Transaction/MysqlTestCase.php index a607b98a7..873f89a9e 100644 --- a/tests/Transaction/MysqlTestCase.php +++ b/tests/Transaction/MysqlTestCase.php @@ -1,30 +1,64 @@ . + */ + +/** + * Doctrine_Transaction_Mysql_TestCase + * + * @package Doctrine + * @author Konsta Vesterinen + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @category Object Relational Mapping + * @link www.phpdoctrine.com + * @since 1.0 + * @version $Revision$ + */ +class Doctrine_Transaction_Mysql_TestCase extends Doctrine_UnitTestCase +{ + public function testCreateSavePointExecutesSql() + { $this->transaction->beginTransaction('mypoint'); $this->assertEqual($this->adapter->pop(), 'SAVEPOINT mypoint'); } - public function testReleaseSavePointExecutesSql() { + public function testReleaseSavePointExecutesSql() + { $this->transaction->commit('mypoint'); $this->assertEqual($this->adapter->pop(), 'RELEASE SAVEPOINT mypoint'); } - public function testRollbackSavePointExecutesSql() { + public function testRollbackSavePointExecutesSql() + { $this->transaction->beginTransaction('mypoint'); $this->transaction->rollback('mypoint'); $this->assertEqual($this->adapter->pop(), 'ROLLBACK TO SAVEPOINT mypoint'); } - public function testGetIsolationExecutesSql() { + public function testGetIsolationExecutesSql() + { $this->transaction->getIsolation(); $this->assertEqual($this->adapter->pop(), 'SELECT @@tx_isolation'); } - public function testSetIsolationThrowsExceptionOnUnknownIsolationMode() { + public function testSetIsolationThrowsExceptionOnUnknownIsolationMode() + { try { $this->transaction->setIsolation('unknown'); $this->fail(); @@ -32,7 +66,8 @@ class Doctrine_Transaction_Mysql_TestCase extends Doctrine_Driver_UnitTestCase { $this->pass(); } } - public function testSetIsolationExecutesSql() { + public function testSetIsolationExecutesSql() + { $this->transaction->setIsolation('READ UNCOMMITTED'); $this->assertEqual($this->adapter->pop(), 'SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED'); diff --git a/tests/Transaction/OracleTestCase.php b/tests/Transaction/OracleTestCase.php index 7822518b7..59a914c28 100644 --- a/tests/Transaction/OracleTestCase.php +++ b/tests/Transaction/OracleTestCase.php @@ -1,23 +1,56 @@ . + */ + +/** + * Doctrine_Transaction_Mysql_TestCase + * + * @package Doctrine + * @author Konsta Vesterinen + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @category Object Relational Mapping + * @link www.phpdoctrine.com + * @since 1.0 + * @version $Revision$ + */ +class Doctrine_Transaction_Oracle_TestCase extends Doctrine_UnitTestCase +{ + public function testCreateSavePointExecutesSql() + { $this->transaction->beginTransaction('mypoint'); $this->assertEqual($this->adapter->pop(), 'SAVEPOINT mypoint'); } - public function testReleaseSavePointAlwaysReturnsTrue() { + public function testReleaseSavePointAlwaysReturnsTrue() + { $this->assertEqual($this->transaction->commit('mypoint'), true); } - public function testRollbackSavePointExecutesSql() { + public function testRollbackSavePointExecutesSql() + { $this->transaction->beginTransaction('mypoint'); $this->transaction->rollback('mypoint'); $this->assertEqual($this->adapter->pop(), 'ROLLBACK TO SAVEPOINT mypoint'); } - public function testSetIsolationThrowsExceptionOnUnknownIsolationMode() { + public function testSetIsolationThrowsExceptionOnUnknownIsolationMode() + { try { $this->transaction->setIsolation('unknown'); $this->fail(); @@ -25,7 +58,8 @@ class Doctrine_Transaction_Oracle_TestCase extends Doctrine_Driver_UnitTestCase $this->pass(); } } - public function testSetIsolationExecutesSql() { + public function testSetIsolationExecutesSql() + { $this->transaction->setIsolation('READ UNCOMMITTED'); $this->transaction->setIsolation('READ COMMITTED'); $this->transaction->setIsolation('REPEATABLE READ'); diff --git a/tests/Transaction/PgsqlTestCase.php b/tests/Transaction/PgsqlTestCase.php index 780392e5a..3d1e80161 100644 --- a/tests/Transaction/PgsqlTestCase.php +++ b/tests/Transaction/PgsqlTestCase.php @@ -1,25 +1,58 @@ . + */ + +/** + * Doctrine_Transaction_Pgsql_TestCase + * + * @package Doctrine + * @author Konsta Vesterinen + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @category Object Relational Mapping + * @link www.phpdoctrine.com + * @since 1.0 + * @version $Revision$ + */ +class Doctrine_Transaction_Pgsql_TestCase extends Doctrine_UnitTestCase +{ + public function testCreateSavePointExecutesSql() + { $this->transaction->beginTransaction('mypoint'); $this->assertEqual($this->adapter->pop(), 'SAVEPOINT mypoint'); } - public function testReleaseSavePointExecutesSql() { + public function testReleaseSavePointExecutesSql() + { $this->transaction->commit('mypoint'); $this->assertEqual($this->adapter->pop(), 'RELEASE SAVEPOINT mypoint'); } - public function testRollbackSavePointExecutesSql() { + public function testRollbackSavePointExecutesSql() + { $this->transaction->beginTransaction('mypoint'); $this->transaction->rollback('mypoint'); $this->assertEqual($this->adapter->pop(), 'ROLLBACK TO SAVEPOINT mypoint'); } - public function testSetIsolationThrowsExceptionOnUnknownIsolationMode() { + public function testSetIsolationThrowsExceptionOnUnknownIsolationMode() + { try { $this->transaction->setIsolation('unknown'); $this->fail(); @@ -27,7 +60,8 @@ class Doctrine_Transaction_Pgsql_TestCase extends Doctrine_Driver_UnitTestCase { $this->pass(); } } - public function testSetIsolationExecutesSql() { + public function testSetIsolationExecutesSql() + { $this->transaction->setIsolation('READ UNCOMMITTED'); $this->assertEqual($this->adapter->pop(), 'SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL READ UNCOMMITTED'); diff --git a/tests/Transaction/SqliteTestCase.php b/tests/Transaction/SqliteTestCase.php index c30955498..4d937dc59 100644 --- a/tests/Transaction/SqliteTestCase.php +++ b/tests/Transaction/SqliteTestCase.php @@ -1,9 +1,39 @@ . + */ + +/** + * Doctrine_Transaction_Sqlite_TestCase + * + * @package Doctrine + * @author Konsta Vesterinen + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @category Object Relational Mapping + * @link www.phpdoctrine.com + * @since 1.0 + * @version $Revision$ + */ +class Doctrine_Transaction_Sqlite_TestCase extends Doctrine_UnitTestCase +{ + public function testSetIsolationThrowsExceptionOnUnknownIsolationMode() + { try { $this->transaction->setIsolation('unknown'); $this->fail(); @@ -11,7 +41,8 @@ class Doctrine_Transaction_Sqlite_TestCase extends Doctrine_Driver_UnitTestCase $this->pass(); } } - public function testSetIsolationExecutesSql() { + public function testSetIsolationExecutesSql() + { $this->transaction->setIsolation('READ UNCOMMITTED'); $this->transaction->setIsolation('READ COMMITTED'); $this->transaction->setIsolation('REPEATABLE READ');