PhpMyObject
[ class tree: PhpMyObject ] [ index: PhpMyObject ] [ all elements ]

Source for file PMO_TestSuite.php

Documentation is available at PMO_TestSuite.php

  1. <?php
  2. /**
  3.  * This file contains the full PMO Test Suite
  4.  *
  5.  * This file is part of the PhpMyObject project,
  6.  * an Object-Relational Mapping (ORM) system.
  7.  * 
  8.  * For questions, help, comments, discussion, etc., please join our
  9.  * forum at {@link http://www.developpez.net/forums/forumdisplay.php?f=770}
  10.  * or our mailing list at {@link http://groups.google.com/group/pmo-dev}.
  11.  *
  12.  * PhpMyProject is free software: you can redistribute it and/or modify
  13.  * it under the terms of the GNU General Public License as published by
  14.  * the Free Software Foundation, either version 3 of the License, or
  15.  * (at your option) any later version.
  16.  *
  17.  * This program is distributed in the hope that it will be useful,
  18.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
  20.  * GNU General Public License for more details.
  21.  *
  22.  * You should have received a copy of the GNU General Public License
  23.  * along with this program.  If not, see {@link http://www.gnu.org/licenses/}.
  24.  *
  25.  * @package            PhpMyObject
  26.  * @subpackage     PMO_Tests
  27.  * @author            Nicolas Boiteux <nicolas_boiteux@yahoo.fr>
  28.  * @author            Louis Lapointe <laplix@gmail.com>
  29.  * @link                http://pmo.developpez.com/
  30.  * @since            PhpMyObject v0.15
  31.  * @version            $Revision: 404 $
  32.  * @copyright        Copyright (c) 2007-2008 Nicolas Boiteux
  33.  * @copyright        Copyright (c) 2008 Louis Lapointe
  34.  * @license            GPLv3 {@link http://www.gnu.org/licenses/gpl}
  35.  * @filesource
  36.  */ 
  37.  
  38. /**
  39.  * if this is not defined, test cases will be able to run
  40.  * individually
  41.  */
  42. define('PMO_TEST_SUITE'TRUE);
  43.  
  44. /**
  45.  * loads the configuration
  46.  */
  47. require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'config.php');
  48.  
  49. // create our test suite
  50. $tests new Testsuite('PMO Test Suite');
  51.  
  52. // add our tests
  53. // each class must be tested by itself to garanty sanity
  54.  
  55. // 
  56. // configuration and utilities
  57. //
  58. $tests->addTestFile('tests/PMO_MyConfig_Test.php');
  59. //$tests->addTestFile('tests/PMO_MyArray_Test.php');
  60. //$tests->addTestFile('tests/PMO_MyParser_Test.php');
  61. $tests->addTestFile('tests/PMO_MyRequest_Test.php');
  62.  
  63. //
  64. // database drivers
  65. // 
  66. // Note: I don't have PosgreSQL and I can't seem to
  67. // make work the mysqli extension
  68. // (laplix)
  69. //
  70. $tests->addTestFile('tests/PMO_Dbms_Mysql_Test.php');
  71. //$tests->addTestFile('tests/PMO_dbms_Mysqli_Test.php');
  72. //$tests->addTestFile('tests/PMO_dbms_Pgsql_Test.php');
  73. $tests->addTestFile('tests/PMO_Dbms_Sqlite_Test.php');
  74. $tests->addTestFile('tests/PMO_Dbms_Pdo_Test.php');
  75.  
  76. // PMO_MyDbms tests with supported drivers
  77. // 
  78. // I got some unresolved bugs in these. So They'll have to wait a bit
  79. //
  80. //$tests->addTestFile('tests/PMO_MyDbms_Mysql_Test.php');
  81. //$tests->addTestFile('tests/PMO_MyDbms_Mysqli_Test.php');
  82. //$tests->addTestFile('tests/PMO_MyDbms_Pgsql_Test.php');
  83. //$tests->addTestFile('tests/PMO_MyDbms_Pdo_Mysql_Test.php');
  84. //$tests->addTestFile('tests/PMO_MyDbms_Pdo_Sqlite_Test.php');
  85.  
  86. //
  87. // controller and objects
  88. //
  89. $tests->addTestFile('tests/PMO_MyObject_Test.php');
  90. $tests->addTestFile('tests/PMO_MyController_Test.php');
  91. //$tests->addTestFile('tests/PMO_MyTable_Test.php');
  92. //$tests->addTestFile('tests/PMO_MyMap_Test.php');
  93.  
  94.  
  95.  
  96. /**
  97.  * Tells HTMLReporter what to show.
  98.  * Usage: http://www.example/com/tests/tmp/PO_TestSuite.php?e=N
  99.  * where N can be
  100.  * none or  level=0: standard simpletest output
  101.  *          level=1: shows subtotals for each test case
  102.  *          level=2: shows all tests being performed
  103.  */
  104. $level '';
  105. if (isset($_GET['level']))
  106.    $level $_GET['level'];
  107.  
  108. // run the tests
  109. $tests->run(new PMO_HTMLReporter($level));
  110. ?>

Documentation generated on Wed, 15 Oct 2008 09:18:13 -0400 by phpDocumentor 1.4.1