mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Added test for CakeTestSuiteDispatcher::loadTestFramework.
This commit is contained in:
parent
5038e7eb38
commit
b17d8c9124
1 changed files with 28 additions and 0 deletions
28
lib/Cake/Test/Case/TestSuite/CakeTestSuiteDispatcherTest.php
Normal file
28
lib/Cake/Test/Case/TestSuite/CakeTestSuiteDispatcherTest.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
class CakeTestSuiteDispatcherTest extends CakeTestCase {
|
||||
|
||||
protected function clearPaths() {
|
||||
App::build(array('Vendor' => array('junk')), App::RESET);
|
||||
ini_set('include_path', 'junk');
|
||||
}
|
||||
|
||||
public function testLoadTestFramework() {
|
||||
$dispatcher = new CakeTestSuiteDispatcher();
|
||||
|
||||
$this->assertTrue($dispatcher->loadTestFramework());
|
||||
|
||||
$this->clearPaths();
|
||||
|
||||
$exception = null;
|
||||
|
||||
try {
|
||||
$dispatcher->loadTestFramework();
|
||||
} catch(Exception $ex) {
|
||||
$exception = $ex;
|
||||
}
|
||||
|
||||
$this->assertEquals(get_class($exception), "PHPUnit_Framework_Error_Warning");
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue