コード例 #1
0
ファイル: run.php プロジェクト: prismhdd/victorioussecret
// Migration Tests
$migration = new GroupTest('Migration Tests', 'migration');
$migration->addTestCase(new Doctrine_Migration_TestCase());
$test->addTestCase($migration);

// File Parser Tests
$parser = new GroupTest('Parser Tests', 'parser');
$parser->addTestCase(new Doctrine_Parser_TestCase());
$test->addTestCase($parser);

// Data Fixtures Tests
$data = new GroupTest('Data exporting/importing fixtures', 'data_fixtures');
$data->addTestCase(new Doctrine_Data_Import_TestCase());
$data->addTestCase(new Doctrine_Data_Export_TestCase());
$test->addTestCase($data);

// Unsorted Tests. These need to be sorted and placed in the appropriate group
$unsorted = new GroupTest('Unsorted Tests', 'unsorted');
$unsorted->addTestCase(new Doctrine_CustomPrimaryKey_TestCase());
$unsorted->addTestCase(new Doctrine_CustomResultSetOrder_TestCase());
$unsorted->addTestCase(new Doctrine_ColumnAlias_TestCase());
//$unsorted->addTestCase(new Doctrine_RawSql_TestCase());
$unsorted->addTestCase(new Doctrine_NewCore_TestCase());
$unsorted->addTestCase(new Doctrine_Template_TestCase());
$unsorted->addTestCase(new Doctrine_NestedSet_SingleRoot_TestCase());
$unsorted->addTestCase(new Doctrine_NestedSet_MultiRoot_TestCase());
$unsorted->addTestCase(new Doctrine_PessimisticLocking_TestCase());
$test->addTestCase($unsorted);

$test->run();
コード例 #2
0
ファイル: run.php プロジェクト: jdudek/doctrine-sortable
<?php

if (isset($argv[1])) {
    $_SERVER['DOCTRINE_DIR'] = $argv[1];
    unset($argv[1]);
    $_SERVER['argv'] = array_values($argv);
}
if (isset($_REQUEST['doctrine_dir'])) {
    $_SERVER['DOCTRINE_DIR'] = $_REQUEST['doctrine_dir'];
}
if (!isset($_SERVER['DOCTRINE_DIR'])) {
    throw new Exception('You must set the path to the DOCTRINE_DIR');
}
require $_SERVER['DOCTRINE_DIR'] . '/tests/bootstrap.php';
spl_autoload_register(array('Doctrine', 'extensionsAutoload'));
Doctrine::setExtensionsPath(realpath(dirname(__FILE__) . '/../'));
$manager = Doctrine_Manager::getInstance()->registerExtension('Sortable', realpath(dirname(__FILE__) . '/../lib'));
$test = new DoctrineTest();
$test->addTestCase(new Doctrine_Template_Sortable_TestCase());
exit($test->run() ? 0 : 1);