1
0
mirror of synced 2025-01-18 06:21:40 +03:00
This commit is contained in:
zYne 2007-06-10 19:40:14 +00:00
parent a361fdaf1a
commit a3bc368b50
5 changed files with 55 additions and 34 deletions

View File

@ -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();

View File

@ -20,7 +20,7 @@
*/
/**
* Doctrine_Connection_TestCase
* Doctrine_Relation_OneToOne_TestCase
*
* @package Doctrine
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>

View File

@ -1,9 +1,41 @@
<?php
class Doctrine_Transaction_TestCase extends Doctrine_Driver_UnitTestCase {
public function __construct() {
parent::__construct('sqlite', true);
}
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
/**
* Doctrine_Transaction_TestCase
*
* @package Doctrine
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @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();

View File

@ -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);

View File

@ -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());