addTestFile() public method

If the named file cannot be read or there are no new tests that can be added, a PHPUnit_Framework_WarningTestCase will be created instead, leaving the current test run untouched.
public addTestFile ( string $filename )
$filename string
Example #1
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->addTestFile(dirname(__FILE__) . '/SqlDao.DatabaseWrapperTest.php');
     $suite->addTestFile(dirname(__FILE__) . '/SqlDao.InitializationTest.php');
     return $suite;
 }
Example #2
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->addTestFile(dirname(__FILE__) . '/Record.CoerceTest.php');
     $suite->addTestFile(dirname(__FILE__) . '/Record.LazyLoading.php');
     return $suite;
 }
Example #3
0
 /**
  * Launches a test module for web inspection of results
  * @param string $module
  * @return boolean
  */
 function WebLauncher($module)
 {
     jf::$ErrorHandler->UnsetErrorHandler();
     $this->LoadFramework();
     self::$TestSuite = new \PHPUnit_Framework_TestSuite();
     self::$TestFiles[] = $this->ModuleFile($module);
     self::$TestSuite->addTestFile(self::$TestFiles[0]);
     $result = new \PHPUnit_Framework_TestResult();
     $listener = new TestListener();
     $result->addListener($listener);
     $Profiler = new Profiler();
     if (function_exists("xdebug_start_code_coverage")) {
         xdebug_start_code_coverage();
     }
     self::$TestSuite->run($result);
     if (function_exists("xdebug_start_code_coverage")) {
         $Coverage = xdebug_get_code_coverage();
     } else {
         $Coverage = null;
     }
     $Profiler->Stop();
     $listener->Finish();
     $this->OutputResult($result, $Profiler, $Coverage);
     return true;
 }
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('PEAR - PHP_LexerGenerator');
     $suite->addTestFile(dirname(__FILE__) . '/LexerTest.php');
     $suite->addTestFile(dirname(__FILE__) . '/LexerGeneratorTest.php');
     return $suite;
 }
Example #5
0
 /**
  * suite method, defines tests for this suite.
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('All Xml related class tests');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'xml.test.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'helpers' . DS . 'rss.test.php');
     return $suite;
 }
Example #6
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->addTestFile(dirname(__FILE__) . '/ProfilerTimer.NaturalTest.php');
     $suite->addTestFile(dirname(__FILE__) . '/ProfilerTimer.FixedTest.php');
     return $suite;
 }
Example #7
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('PHPUnit');
     $suite->addTestFile(dirname(__FILE__) . '/schemaIncrementTasks/SchemaIncrementTask55Test.php');
     $suite->addTestFile(dirname(__FILE__) . '/schemaIncrementTasks/SchemaIncrementTask58Test.php');
     return $suite;
 }
Example #8
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite();
     $suite->addTestFile(dirname(__FILE__) . '/Dao.BasicTest.php');
     $suite->addTestFile(dirname(__FILE__) . '/Dao.ReferenceTest.php');
     return $suite;
 }
Example #9
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('All FilterPlugin tests');
     $suite->addTestFile(dirname(__FILE__) . DS . 'Controller' . DS . 'Component' . DS . 'FilterTest.php');
     $suite->addTestFile(dirname(__FILE__) . DS . 'Model' . DS . 'Behaviors' . DS . 'FilteredTest.php');
     return $suite;
 }
Example #10
0
 /**
  * suite method, defines tests for this suite.
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('All View class tests');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'view.test.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'theme.test.php');
     return $suite;
 }
Example #11
0
 public function addTest($path)
 {
     // bootstrap invokation is slightly different for PHPUnit
     if (file_exists($this->settings['bootstrap'])) {
         require_once $this->settings['bootstrap'];
     }
     $this->suite->addTestFile($path);
 }
Example #12
0
 /**
  * suite method, defines tests for this suite.
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('All Error handling tests');
     $libs = CORE_TEST_CASES . DS . 'libs' . DS;
     $suite->addTestFile($libs . 'error' . DS . 'error_handler.test.php');
     $suite->addTestFile($libs . 'error' . DS . 'exception_renderer.test.php');
     return $suite;
 }
Example #13
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('All Tests');
     $path = App::pluginPath('AppDescription') . 'Test' . DS . 'Case' . DS;
     $suite->addTestFile($path . 'Lib' . DS . 'GooglePlayApiTest.php');
     $suite->addTestFile($path . 'Model' . DS . 'Datasource' . DS . 'AppDescriptionSourceTest.php');
     return $suite;
 }
Example #14
0
 /**
  * suite method, defines tests for this suite.
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('All localization class tests');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'i18n.test.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'l10n.test.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'multibyte.test.php');
     return $suite;
 }
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('orangehrmAttendancePluginAllTest');
     /* Dao Test Cases */
     $suite->addTestFile(dirname(__FILE__) . '/model/dao/AttendanceDaoTest.php');
     /* Service Test Cases */
     $suite->addTestFile(dirname(__FILE__) . '/model/service/AttendanceServiceTest.php');
     return $suite;
 }
Example #16
0
 /**
  * suite method, defines tests for this suite.
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('All Test Suite classes tests');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'cake_test_case.test.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'cake_test_fixture.test.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'html_coverage_report.test.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'controller_test_case.test.php');
     return $suite;
 }
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('orangehrmPerformanceTrackerPluginAllTest');
     /* Dao Test Cases */
     $suite->addTestFile(dirname(__FILE__) . '/model/dao/PerformanceTrackerDaoTest.php');
     /*Services Test Cases*/
     $suite->addTestFile(dirname(__FILE__) . '/model/service/PerformanceTrackerServiceTest.php');
     return $suite;
 }
Example #18
0
 /**
  * Suite define the tests for this suite
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('Js Helper and all Engine Helpers');
     $helperTestPath = CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'helpers' . DS;
     $suite->addTestFile($helperTestPath . 'js.test.php');
     $suite->addTestFile($helperTestPath . 'jquery_engine.test.php');
     $suite->addTestFile($helperTestPath . 'mootools_engine.test.php');
     $suite->addTestFile($helperTestPath . 'prototype_engine.test.php');
     return $suite;
 }
 /**
  * Define the tests for this suite
  *
  * @return PHPUnit_Framework_TestSuite
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('All App Tests');
     $path = APP_TEST_CASES . DS;
     $suite->addTestFile($path . 'AllLibTest.php');
     $suite->addTestFile($path . 'AllModelTest.php');
     $suite->addTestFile($path . 'AllControllerTest.php');
     $suite->addTestFile($path . 'AllViewTest.php');
     return $suite;
 }
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('orangehrmCorporateDirectoryPlugin');
     /* Dao Test Cases */
     $suite->addTestFile(dirname(__FILE__) . '/model/dao/EmployeeDirectoryDaoTest.php');
     $suite->addTestFile(dirname(__FILE__) . '/model/service/EmployeeDirectoryServiceTest.php');
     /* Helper Test */
     $suite->addTestFile(dirname(__FILE__) . '/model/wrapper/CorporateDirectoryWebServiceHelperTest.php');
     return $suite;
 }
Example #21
0
 /**
  * suite method, defines tests for this suite.
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('All Model related class tests');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'behavior_collection.test.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_read.test.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_write.test.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_validation.test.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_integration.test.php');
     return $suite;
 }
 /**
  * Suite define the tests for this suite
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('All Search Plugin Tests');
     $basePath = CakePlugin::path('Search') . DS . 'Test' . DS . 'Case' . DS;
     // components
     $suite->addTestFile($basePath . 'Controller' . DS . 'Component' . DS . 'PrgComponentTest.php');
     // behaviors
     $suite->addTestFile($basePath . 'Model' . DS . 'Behavior' . DS . 'SearchableBehaviorTest.php');
     return $suite;
 }
Example #23
0
 public static function suite()
 {
     $rootLoc = dirname(__FILE__);
     $suite = new PHPUnit_Framework_TestSuite('AiryMVC Framework - Test Suite');
     $suite->addTestFile($rootLoc . '/app/lib/db/MysqlComponentTest.php');
     $suite->addTestFile($rootLoc . '/app/lib/db/SqlDbTest.php');
     $suite->addTestFile($rootLoc . '/app/lib/db/MssqlComponentTest.php');
     //  		$suite->addTestFile($rootLoc.'/app/lib/db/MongoDbAccessTest.php');
     return $suite;
 }
 /**
  * suite method, defines tests for this suite.
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('All Recon App related class tests');
     $pluginTestPath = array('Plugin', 'Elastic', 'Test', 'Case');
     /* Datasource */
     $suite->addTestFile(APP . implode(DS, array_merge($pluginTestPath, array('Model', 'DataSource', 'ElasticSourceTest.php'))));
     /* Behaviors */
     $suite->addTestFile(APP . implode(DS, array_merge($pluginTestPath, array('Model', 'Behavior', 'IndexableBehaviorTest.php'))));
     return $suite;
 }
Example #25
0
 /**
  * Suite define the tests for this suite
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('All Users Plugin Tests');
     $basePath = CakePlugin::path('Users') . DS . 'Test' . DS . 'Case' . DS;
     // controllers
     $suite->addTestFile($basePath . 'Controller' . DS . 'UsersControllerTest.php');
     // models
     $suite->addTestFile($basePath . 'Model' . DS . 'UserTest.php');
     return $suite;
 }
Example #26
0
 /**
  * suite method, defines tests for this suite.
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('All Controller related class tests');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'controller.test.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'scaffold.test.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'pages_controller.test.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'component.test.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'controller_merge_vars.test.php');
     return $suite;
 }
 /**
  * Suite define the tests for this suite
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('All Imagine Plugin Tests');
     $basePath = CakePlugin::path('Imagine') . DS . 'Test' . DS . 'Case' . DS;
     $suite->addTestFile($basePath . 'Controller' . DS . 'Component' . DS . 'ImagineComponentTest.php');
     $suite->addTestFile($basePath . 'Lib' . DS . 'ImagineUtilityTest.php');
     $suite->addTestFile($basePath . 'Model' . DS . 'Behavior' . DS . 'ImagineBehaviorTest.php');
     $suite->addTestFile($basePath . 'View' . DS . 'Helper' . DS . 'ImagineHelperTest.php');
     return $suite;
 }
 /**
  * suite method, defines tests for this suite.
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('All Model related class tests');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'ModelReadTest.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'ModelWriteTest.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'ModelDeleteTest.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'ModelValidationTest.php');
     $suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'ModelIntegrationTest.php');
     return $suite;
 }
Example #29
0
 /**
  * Defines the tests for this suite.
  *
  * @return CakeTestSuite
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('All Tests');
     $path = dirname(__FILE__) . DS;
     $suite->addTestFile($path . 'AllBehaviorsTest.php');
     $suite->addTestFile($path . 'AllHelpersTest.php');
     $suite->addTestFile($path . 'AllLibsTest.php');
     $suite->addTestFile($path . 'AllModelsTest.php');
     return $suite;
 }
Example #30
0
 /**
  * Suite define the tests for this suite
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('Model Behavior and all behaviors');
     $path = CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'behaviors' . DS;
     $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'behavior_collection.test.php');
     $suite->addTestFile($path . 'acl.test.php');
     $suite->addTestFile($path . 'containable.test.php');
     $suite->addTestFile($path . 'translate.test.php');
     $suite->addTestFile($path . 'tree.test.php');
     return $suite;
 }