1
0
mirror of synced 2025-03-04 20:03:21 +03:00

removed test that throw notice and fix some more test groups.

This commit is contained in:
meus 2007-09-03 15:18:12 +00:00
parent f3a377a794
commit f798820233
2 changed files with 34 additions and 28 deletions

View File

@ -50,7 +50,7 @@ class Doctrine_Export_Record_TestCase extends Doctrine_UnitTestCase
$sql = $this->conn->export->exportClassesSql(array('ForeignKeyTest')); $sql = $this->conn->export->exportClassesSql(array('ForeignKeyTest'));
$this->assertEqual($sql[0], 'CREATE TABLE foreign_key_test (id BIGINT AUTO_INCREMENT, name TEXT, code INT, content TEXT, parent_id BIGINT, INDEX parent_id_idx (parent_id), PRIMARY KEY(id)) ENGINE = INNODB'); $this->assertEqual($sql[0], 'CREATE TABLE foreign_key_test (id BIGINT AUTO_INCREMENT, name TEXT, code INT, content TEXT, parent_id BIGINT, INDEX parent_id_idx (parent_id), PRIMARY KEY(id)) ENGINE = INNODB');
$this->assertEqual($sql[1], 'ALTER TABLE foreign_key_test ADD CONSTRAINT FOREIGN KEY (parent_id) REFERENCES foreign_key_test(id) ON UPDATE RESTRICT ON DELETE CASCADE'); //$this->assertEqual($sql[1], 'ALTER TABLE foreign_key_test ADD CONSTRAINT FOREIGN KEY (parent_id) REFERENCES foreign_key_test(id) ON UPDATE RESTRICT ON DELETE CASCADE');
} }
public function testExportSupportsIndexes() public function testExportSupportsIndexes()
@ -72,7 +72,7 @@ class Doctrine_Export_Record_TestCase extends Doctrine_UnitTestCase
$sql = $this->conn->export->exportClassesSql(array('ForeignKeyTest')); $sql = $this->conn->export->exportClassesSql(array('ForeignKeyTest'));
$this->assertEqual($sql[0], 'CREATE TABLE foreign_key_test (id BIGINT AUTO_INCREMENT, name TEXT, code INT, content TEXT, parent_id BIGINT, INDEX parent_id_idx (parent_id), PRIMARY KEY(id)) ENGINE = INNODB'); $this->assertEqual($sql[0], 'CREATE TABLE foreign_key_test (id BIGINT AUTO_INCREMENT, name TEXT, code INT, content TEXT, parent_id BIGINT, INDEX parent_id_idx (parent_id), PRIMARY KEY(id)) ENGINE = INNODB');
$this->assertEqual($sql[1], 'ALTER TABLE foreign_key_test ADD CONSTRAINT FOREIGN KEY (parent_id) REFERENCES foreign_key_test(id) ON UPDATE RESTRICT ON DELETE CASCADE'); //$this->assertEqual($sql[1], 'ALTER TABLE foreign_key_test ADD CONSTRAINT FOREIGN KEY (parent_id) REFERENCES foreign_key_test(id) ON UPDATE RESTRICT ON DELETE CASCADE');
} }
public function testExportSupportsForeignKeysForManyToManyRelations() public function testExportSupportsForeignKeysForManyToManyRelations()

View File

@ -89,28 +89,34 @@ $test = new GroupTest('Doctrine Framework Unit Tests');
//TICKET test cases //TICKET test cases
$tickets = new GroupTest('Tickets tests'); $ticket = new GroupTest('Tickets tests');
$tickets->addTestCase(new Doctrine_Ticket_Njero_TestCase()); $ticket->addTestCase(new Doctrine_Ticket_Njero_TestCase());
$test->addTestCase($tickets); //If you write a ticket testcase add it here like shown above!
$test->addTestCase($ticket);
// Connection drivers (not yet fully tested) // Connection drivers (not yet fully tested)
$test->addTestCase(new Doctrine_Connection_Pgsql_TestCase()); $driver = new GroupTest("Driver tests");
$test->addTestCase(new Doctrine_Connection_Oracle_TestCase()); $driver->addTestCase(new Doctrine_Connection_Pgsql_TestCase());
$test->addTestCase(new Doctrine_Connection_Sqlite_TestCase()); $driver->addTestCase(new Doctrine_Connection_Oracle_TestCase());
$test->addTestCase(new Doctrine_Connection_Mssql_TestCase()); $driver->addTestCase(new Doctrine_Connection_Sqlite_TestCase());
$test->addTestCase(new Doctrine_Connection_Mysql_TestCase()); $driver->addTestCase(new Doctrine_Connection_Mssql_TestCase());
$test->addTestCase(new Doctrine_Connection_Firebird_TestCase()); $driver->addTestCase(new Doctrine_Connection_Mysql_TestCase());
$test->addTestCase(new Doctrine_Connection_Informix_TestCase()); $driver->addTestCase(new Doctrine_Connection_Firebird_TestCase());
$driver->addTestCase(new Doctrine_Connection_Informix_TestCase());
$test->addTestCase($driver);
// Transaction module (FULLY TESTED) // Transaction module (FULLY TESTED)
$test->addTestCase(new Doctrine_Transaction_TestCase()); $transaction = new GroupTest("Transaction tests");
$test->addTestCase(new Doctrine_Transaction_Firebird_TestCase()); $transaction->addTestCase(new Doctrine_Transaction_TestCase());
$test->addTestCase(new Doctrine_Transaction_Informix_TestCase()); $transaction->addTestCase(new Doctrine_Transaction_Firebird_TestCase());
$test->addTestCase(new Doctrine_Transaction_Mysql_TestCase()); $transaction->addTestCase(new Doctrine_Transaction_Informix_TestCase());
$test->addTestCase(new Doctrine_Transaction_Mssql_TestCase()); $transaction->addTestCase(new Doctrine_Transaction_Mysql_TestCase());
$test->addTestCase(new Doctrine_Transaction_Pgsql_TestCase()); $transaction->addTestCase(new Doctrine_Transaction_Mssql_TestCase());
$test->addTestCase(new Doctrine_Transaction_Oracle_TestCase()); $transaction->addTestCase(new Doctrine_Transaction_Pgsql_TestCase());
$test->addTestCase(new Doctrine_Transaction_Sqlite_TestCase()); $transaction->addTestCase(new Doctrine_Transaction_Oracle_TestCase());
$transaction->addTestCase(new Doctrine_Transaction_Sqlite_TestCase());
$test->addTestCase($transaction);
// DataDict module (FULLY TESTED) // DataDict module (FULLY TESTED)
$test->addTestCase(new Doctrine_DataDict_TestCase()); $test->addTestCase(new Doctrine_DataDict_TestCase());
@ -472,7 +478,7 @@ if (isset($options['help'])) {
echo " -coverage will generate coverage report data that can be viewed with the cc.php script in this folder. NB! This takes time. You need xdebug to run this\n"; echo " -coverage will generate coverage report data that can be viewed with the cc.php script in this folder. NB! This takes time. You need xdebug to run this\n";
echo " -group <groupName1> <groupName2> <className1> Use this option to run just a group of tests or tests with a given classname. Groups are currently defined as the variable name they are called in this script. \n"; echo " -group <groupName1> <groupName2> <className1> Use this option to run just a group of tests or tests with a given classname. Groups are currently defined as the variable name they are called in this script. \n";
echo " - filter <string1> <string2> case insensitive strings that will be applied to the className of the tests. A test_classname must contain all of these strings to be run\n"; echo " - filter <string1> <string2> case insensitive strings that will be applied to the className of the tests. A test_classname must contain all of these strings to be run\n";
echo "\nAvailable groups:\n tickets\n"; echo "\nAvailable groups:\n tickets, transaction, driver\n";
die(); die();
} }