From b17d8c91244365351a4e9bff7a64d0aa4ec998cd Mon Sep 17 00:00:00 2001 From: pjskeptic Date: Tue, 12 Mar 2013 23:34:30 -0400 Subject: [PATCH] Added test for CakeTestSuiteDispatcher::loadTestFramework. --- .../TestSuite/CakeTestSuiteDispatcherTest.php | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lib/Cake/Test/Case/TestSuite/CakeTestSuiteDispatcherTest.php diff --git a/lib/Cake/Test/Case/TestSuite/CakeTestSuiteDispatcherTest.php b/lib/Cake/Test/Case/TestSuite/CakeTestSuiteDispatcherTest.php new file mode 100644 index 00000000000..be676240a47 --- /dev/null +++ b/lib/Cake/Test/Case/TestSuite/CakeTestSuiteDispatcherTest.php @@ -0,0 +1,28 @@ + 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"); + } + +}