Skip to content

Commit

Permalink
Added test for CakeTestSuiteDispatcher::loadTestFramework.
Browse files Browse the repository at this point in the history
  • Loading branch information
psparrow committed Mar 13, 2013
1 parent 5038e7e commit b17d8c9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions lib/Cake/Test/Case/TestSuite/CakeTestSuiteDispatcherTest.php
@@ -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");
}

}

0 comments on commit b17d8c9

Please sign in to comment.