2006-04-14 00:37:28 +04:00
|
|
|
<?php
|
2006-04-16 12:41:45 +04:00
|
|
|
ob_start();
|
2006-04-14 00:37:28 +04:00
|
|
|
require_once("ConfigurableTestCase.class.php");
|
|
|
|
require_once("ManagerTestCase.class.php");
|
|
|
|
require_once("SessionTestCase.class.php");
|
|
|
|
require_once("TableTestCase.class.php");
|
|
|
|
require_once("EventListenerTestCase.class.php");
|
|
|
|
require_once("BatchIteratorTestCase.class.php");
|
|
|
|
require_once("CacheFileTestCase.class.php");
|
|
|
|
require_once("RecordTestCase.class.php");
|
|
|
|
require_once("DQLParserTestCase.class.php");
|
|
|
|
require_once("AccessTestCase.class.php");
|
|
|
|
require_once("ValidatorTestCase.class.php");
|
2006-04-17 00:38:17 +04:00
|
|
|
require_once("CollectionTestCase.class.php");
|
2006-04-15 02:25:02 +04:00
|
|
|
|
|
|
|
require_once("CacheSqliteTestCase.class.php");
|
2006-04-19 20:01:36 +04:00
|
|
|
require_once("CollectionOffsetTestCase.class.php");
|
2006-04-16 12:41:45 +04:00
|
|
|
require_once("SenseiTestCase.class.php");
|
2006-04-15 02:25:02 +04:00
|
|
|
|
|
|
|
|
2006-04-14 00:37:28 +04:00
|
|
|
print "<pre>";
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
|
|
|
|
$test = new GroupTest("Doctrine Framework Unit Tests");
|
|
|
|
|
2006-04-21 12:39:09 +04:00
|
|
|
$test->addTestCase(new Doctrine_SessionTestCase());
|
2006-04-22 13:08:02 +04:00
|
|
|
|
|
|
|
|
2006-04-21 12:39:09 +04:00
|
|
|
$test->addTestCase(new Doctrine_RecordTestCase());
|
2006-04-14 00:37:28 +04:00
|
|
|
|
2006-04-17 02:17:23 +04:00
|
|
|
|
2006-04-14 14:20:19 +04:00
|
|
|
|
2006-04-14 00:37:28 +04:00
|
|
|
$test->addTestCase(new Doctrine_ValidatorTestCase());
|
|
|
|
|
|
|
|
$test->addTestCase(new Doctrine_ManagerTestCase());
|
2006-04-17 01:23:38 +04:00
|
|
|
|
2006-04-14 00:37:28 +04:00
|
|
|
$test->addTestCase(new Doctrine_TableTestCase());
|
|
|
|
|
|
|
|
$test->addTestCase(new Doctrine_AccessTestCase());
|
2006-04-17 00:38:17 +04:00
|
|
|
|
2006-04-14 00:37:28 +04:00
|
|
|
|
|
|
|
$test->addTestCase(new Doctrine_EventListenerTestCase());
|
2006-04-17 02:17:23 +04:00
|
|
|
|
2006-04-17 01:23:38 +04:00
|
|
|
$test->addTestCase(new Doctrine_BatchIteratorTestCase());
|
2006-04-16 00:52:23 +04:00
|
|
|
|
2006-04-17 01:23:38 +04:00
|
|
|
$test->addTestCase(new Doctrine_DQL_ParserTestCase());
|
2006-04-17 00:38:17 +04:00
|
|
|
|
|
|
|
$test->addTestCase(new Doctrine_ConfigurableTestCase());
|
2006-04-17 02:46:05 +04:00
|
|
|
|
2006-04-19 20:01:36 +04:00
|
|
|
$test->addTestCase(new Doctrine_CollectionTestCase());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-04-21 12:39:09 +04:00
|
|
|
|
2006-04-19 20:01:36 +04:00
|
|
|
$test->addTestCase(new Doctrine_Collection_OffsetTestCase());
|
2006-04-21 12:39:09 +04:00
|
|
|
$test->addTestCase(new Sensei_UnitTestCase());
|
2006-04-17 02:17:23 +04:00
|
|
|
|
2006-04-17 00:38:17 +04:00
|
|
|
|
2006-04-15 14:15:16 +04:00
|
|
|
//$test->addTestCase(new Doctrine_Cache_FileTestCase());
|
|
|
|
//$test->addTestCase(new Doctrine_Cache_SqliteTestCase());
|
|
|
|
|
2006-04-14 00:37:28 +04:00
|
|
|
|
|
|
|
|
2006-04-14 14:37:13 +04:00
|
|
|
|
2006-04-14 14:20:19 +04:00
|
|
|
|
2006-04-14 00:37:28 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$test->run(new HtmlReporter());
|
2006-04-15 14:15:16 +04:00
|
|
|
$cache = Doctrine_Manager::getInstance()->getCurrentSession()->getCacheHandler();
|
|
|
|
if(isset($cache)) {
|
|
|
|
$a = $cache->getQueries();
|
|
|
|
print "Executed cache queries: ".count($a)."\n";
|
|
|
|
/**
|
|
|
|
foreach($a as $query) {
|
|
|
|
print $query."\n";
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
}
|
2006-04-15 02:25:02 +04:00
|
|
|
|
2006-04-14 14:20:19 +04:00
|
|
|
$dbh = Doctrine_Manager::getInstance()->getCurrentSession()->getDBH();
|
|
|
|
$a = $dbh->getQueries();
|
2006-04-14 00:37:28 +04:00
|
|
|
|
|
|
|
print "Executed queries: ".count($a)."\n";
|
|
|
|
|
|
|
|
foreach($a as $query) {
|
|
|
|
print $query."\n";
|
|
|
|
}
|
2006-04-16 12:41:45 +04:00
|
|
|
ob_end_flush();
|
2006-04-14 00:37:28 +04:00
|
|
|
?>
|