Source for file PMO_TestSuite.php
Documentation is available at PMO_TestSuite.php
* This file contains the full PMO Test Suite
* This file is part of the PhpMyObject project,
* an Object-Relational Mapping (ORM) system.
* For questions, help, comments, discussion, etc., please join our
* forum at {@link http://www.developpez.net/forums/forumdisplay.php?f=770}
* or our mailing list at {@link http://groups.google.com/group/pmo-dev}.
* PhpMyProject is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see {@link http://www.gnu.org/licenses/}.
* @author Nicolas Boiteux <nicolas_boiteux@yahoo.fr>
* @author Louis Lapointe <laplix@gmail.com>
* @link http://pmo.developpez.com/
* @since PhpMyObject v0.15
* @version $Revision: 404 $
* @copyright Copyright (c) 2007-2008 Nicolas Boiteux
* @copyright Copyright (c) 2008 Louis Lapointe
* @license GPLv3 {@link http://www.gnu.org/licenses/gpl}
* if this is not defined, test cases will be able to run
define('PMO_TEST_SUITE', TRUE);
* loads the configuration
require_once(dirname(__FILE__ ). DIRECTORY_SEPARATOR. 'config.php');
$tests = new Testsuite('PMO Test Suite');
// each class must be tested by itself to garanty sanity
// configuration and utilities
$tests->addTestFile('tests/PMO_MyConfig_Test.php');
//$tests->addTestFile('tests/PMO_MyArray_Test.php');
//$tests->addTestFile('tests/PMO_MyParser_Test.php');
$tests->addTestFile('tests/PMO_MyRequest_Test.php');
// Note: I don't have PosgreSQL and I can't seem to
// make work the mysqli extension
$tests->addTestFile('tests/PMO_Dbms_Mysql_Test.php');
//$tests->addTestFile('tests/PMO_dbms_Mysqli_Test.php');
//$tests->addTestFile('tests/PMO_dbms_Pgsql_Test.php');
$tests->addTestFile('tests/PMO_Dbms_Sqlite_Test.php');
$tests->addTestFile('tests/PMO_Dbms_Pdo_Test.php');
// PMO_MyDbms tests with supported drivers
// I got some unresolved bugs in these. So They'll have to wait a bit
//$tests->addTestFile('tests/PMO_MyDbms_Mysql_Test.php');
//$tests->addTestFile('tests/PMO_MyDbms_Mysqli_Test.php');
//$tests->addTestFile('tests/PMO_MyDbms_Pgsql_Test.php');
//$tests->addTestFile('tests/PMO_MyDbms_Pdo_Mysql_Test.php');
//$tests->addTestFile('tests/PMO_MyDbms_Pdo_Sqlite_Test.php');
// controller and objects
$tests->addTestFile('tests/PMO_MyObject_Test.php');
$tests->addTestFile('tests/PMO_MyController_Test.php');
//$tests->addTestFile('tests/PMO_MyTable_Test.php');
//$tests->addTestFile('tests/PMO_MyMap_Test.php');
* Tells HTMLReporter what to show.
* Usage: http://www.example/com/tests/tmp/PO_TestSuite.php?e=N
* none or level=0: standard simpletest output
* level=1: shows subtotals for each test case
* level=2: shows all tests being performed
if (isset ($_GET['level']))
$tests->run(new PMO_HTMLReporter($level));
|