From a3bc368b50d484a8d6127b253d58cc346a6264e1 Mon Sep 17 00:00:00 2001 From: zYne Date: Sun, 10 Jun 2007 19:40:14 +0000 Subject: [PATCH] --- tests/Relation/ManyToManyTestCase.php | 18 ------------ tests/Relation/OneToOneTestCase.php | 2 +- tests/TransactionTestCase.php | 42 +++++++++++++++++++++++---- tests/UnitTestCase.php | 2 +- tests/run.php | 25 ++++++++++------ 5 files changed, 55 insertions(+), 34 deletions(-) diff --git a/tests/Relation/ManyToManyTestCase.php b/tests/Relation/ManyToManyTestCase.php index 563b2dea3..9df06d13d 100644 --- a/tests/Relation/ManyToManyTestCase.php +++ b/tests/Relation/ManyToManyTestCase.php @@ -122,25 +122,7 @@ class Doctrine_Relation_ManyToMany_TestCase extends Doctrine_UnitTestCase { } $this->assertEqual($rel->getForeign(), 'oid'); } - /** - public function testManyToManyRelationFetchingWithAliasesAndCustomPKs() { - $q = new Doctrine_Query(); - try { - $q->from('M2MTest2 m LEFT JOIN m.RTC5'); - $this->pass(); - } catch(Doctrine_Exception $e) { - $this->fail(); - } - - try { - $q->execute(); - $this->pass(); - } catch(Doctrine_Exception $e) { - $this->fail(); - } - } - */ public function testManyToManyRelationFetchingWithAliasesAndCustomPKs2() { $q = new Doctrine_Query(); diff --git a/tests/Relation/OneToOneTestCase.php b/tests/Relation/OneToOneTestCase.php index 3f2dd8159..7589a016f 100644 --- a/tests/Relation/OneToOneTestCase.php +++ b/tests/Relation/OneToOneTestCase.php @@ -20,7 +20,7 @@ */ /** - * Doctrine_Connection_TestCase + * Doctrine_Relation_OneToOne_TestCase * * @package Doctrine * @author Konsta Vesterinen diff --git a/tests/TransactionTestCase.php b/tests/TransactionTestCase.php index 6e847debd..b61bcf3f6 100644 --- a/tests/TransactionTestCase.php +++ b/tests/TransactionTestCase.php @@ -1,9 +1,41 @@ . + */ + /** + * Doctrine_Transaction_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_TestCase extends Doctrine_UnitTestCase +{ + public function testInit() + { + $this->transaction = new Doctrine_Transaction_Mock(); + } public function testCreateSavepointIsOnlyImplementedAtDriverLevel() { try { $this->transaction->beginTransaction('point'); @@ -20,7 +52,7 @@ class Doctrine_Transaction_TestCase extends Doctrine_Driver_UnitTestCase { $this->pass(); } } -*/ + public function testRollbackSavepointIsOnlyImplementedAtDriverLevel() { try { $this->transaction->beginTransaction(); diff --git a/tests/UnitTestCase.php b/tests/UnitTestCase.php index 343af1179..2c9a89e59 100644 --- a/tests/UnitTestCase.php +++ b/tests/UnitTestCase.php @@ -97,7 +97,7 @@ class Doctrine_UnitTestCase extends UnitTestCase { if($this->driverName == 'main') { $this->dbh = Doctrine_Db::getConnection('sqlite::memory:'); } else { - $this->dbh = $this->adapter = new AdapterMock($this->driverName); + $this->dbh = $this->adapter = new Doctrine_Adapter_Mock($this->driverName); } $this->conn = $this->connection = $this->manager->openConnection($this->dbh, $this->driverName); diff --git a/tests/run.php b/tests/run.php index eb339e87f..becdfd57d 100644 --- a/tests/run.php +++ b/tests/run.php @@ -65,7 +65,7 @@ $test = new GroupTest('Doctrine Framework Unit Tests'); // DATABASE ABSTRACTION tests -/** +/** */ // Connection drivers (not yet fully tested) $test->addTestCase(new Doctrine_Connection_Pgsql_TestCase()); $test->addTestCase(new Doctrine_Connection_Oracle_TestCase()); @@ -116,7 +116,6 @@ $test->addTestCase(new Doctrine_Export_Mssql_TestCase()); $test->addTestCase(new Doctrine_Export_Pgsql_TestCase()); $test->addTestCase(new Doctrine_Export_Oracle_TestCase()); $test->addTestCase(new Doctrine_Export_Sqlite_TestCase()); - $test->addTestCase(new Doctrine_Export_Mysql_TestCase()); $test->addTestCase(new Doctrine_CascadingDelete_TestCase()); @@ -141,9 +140,9 @@ $test->addTestCase(new Doctrine_Expression_Mssql_TestCase()); $test->addTestCase(new Doctrine_Expression_Pgsql_TestCase()); $test->addTestCase(new Doctrine_Expression_Oracle_TestCase()); $test->addTestCase(new Doctrine_Expression_Sqlite_TestCase()); - */ + // Core - /** */ + $test->addTestCase(new Doctrine_Access_TestCase()); //$test->addTestCase(new Doctrine_Configurable_TestCase()); @@ -163,8 +162,12 @@ $test->addTestCase(new Doctrine_Relation_TestCase()); //$test->addTestCase(new Doctrine_Relation_Access_TestCase()); //$test->addTestCase(new Doctrine_Relation_ManyToMany_TestCase()); + +//$test->addTestCase(new Doctrine_Relation_Nest_TestCase()); + $test->addTestCase(new Doctrine_Relation_OneToOne_TestCase()); -//$test->addTestCase(new Doctrine_Relation_Parser_TestCase()); + +$test->addTestCase(new Doctrine_Relation_Parser_TestCase()); // Datatypes $test->addTestCase(new Doctrine_Enum_TestCase()); @@ -243,7 +246,6 @@ $test->addTestCase(new Doctrine_Query_Join_TestCase()); $test->addTestCase(new Doctrine_Query_Having_TestCase()); -$test->addTestCase(new Doctrine_Query_Where_TestCase()); $test->addTestCase(new Doctrine_RawSql_TestCase()); @@ -253,9 +255,9 @@ $test->addTestCase(new Doctrine_Query_Subquery_TestCase()); $test->addTestCase(new Doctrine_Query_AggregateValue_TestCase()); -$test->addTestCase(new Doctrine_Query_Select_TestCase()); -$test->addTestCase(new Doctrine_Query_From_TestCase()); + + $test->addTestCase(new Doctrine_NewCore_TestCase()); // Record @@ -271,8 +273,13 @@ $test->addTestCase(new Doctrine_Collection_Snapshot_TestCase()); $test->addTestCase(new Doctrine_Hydrate_FetchMode_TestCase()); +$test->addTestCase(new Doctrine_Query_Where_TestCase()); -//$test->addTestCase(new Doctrine_AuditLog_TestCase()); +$test->addTestCase(new Doctrine_Query_From_TestCase()); + +$test->addTestCase(new Doctrine_AuditLog_TestCase()); + +$test->addTestCase(new Doctrine_Query_Select_TestCase()); // Cache tests //$test->addTestCase(new Doctrine_Cache_Query_SqliteTestCase());