vendors = App::path('vendors'); $this->includePath = ini_get('include_path'); } /** * tearDown method * * @return void */ public function tearDown() { App::build(array('Vendor' => $this->vendors), App::RESET); ini_set('include_path', $this->includePath); } /** * Helper method to set vendor path * * @return void */ protected function _clearPaths() { App::build(array('Vendor' => array('junk')), App::RESET); ini_set('include_path', 'junk'); } /** * testLoadTestFramework method * * @return void */ public function testLoadTestFramework() { $dispatcher = new CakeTestSuiteDispatcher(); $this->assertTrue($dispatcher->loadTestFramework()); $this->_clearPaths(); $this->setExpectedException('PHPUnit_Framework_Error_Warning'); $dispatcher->loadTestFramework(); } }