Permalink
Browse files

Updating test manager test cases to reflect changes in API.

  • Loading branch information...
1 parent a0aca7e commit e304246e8f177daf207952c1c3beb44abe669b89 @markstory markstory committed Jan 10, 2010
Showing with 6 additions and 7 deletions.
  1. +6 −7 cake/tests/cases/libs/test_manager.test.php
@@ -19,7 +19,6 @@
* @since CakePHP(tm) v 1.2.0.4206
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
-App::import('Core', 'TestManager');
/**
* TestManagerTest class
@@ -36,7 +35,7 @@ class TestManagerTest extends CakeTestCase {
* @access public
*/
function setUp() {
- $this->Sut =& new TestManager();
+ $this->TestManager =& new TestManager();
$this->Reporter =& new CakeHtmlReporter();
}
@@ -47,12 +46,12 @@ function setUp() {
* @access public
*/
function testRunAllTests() {
- $folder =& new Folder($this->Sut->_getTestsPath());
- $extension = str_replace('.', '\.', TestManager::getExtension('test'));
+ $folder =& new Folder($this->TestManager->_getTestsPath());
+ $extension = str_replace('.', '\.', $this->TestManager->getExtension('test'));
$out = $folder->findRecursive('.*' . $extension);
$reporter =& new CakeHtmlReporter();
- $list = TestManager::runAllTests($reporter, true);
+ $list = $this->TestManager->runAllTests($reporter, true);
$this->assertEqual(count($out), count($list));
}
@@ -65,12 +64,12 @@ function testRunAllTests() {
*/
function testRunTestCase() {
$file = md5(time());
- $result = $this->Sut->runTestCase($file, $this->Reporter);
+ $result = $this->TestManager->runTestCase($file, $this->Reporter);
$this->assertError('Test case ' . $file . ' cannot be found');
$this->assertFalse($result);
$file = str_replace(CORE_TEST_CASES, '', __FILE__);
- $result = $this->Sut->runTestCase($file, $this->Reporter, true);
+ $result = $this->TestManager->runTestCase($file, $this->Reporter, true);
$this->assertTrue($result);
}

0 comments on commit e304246

Please sign in to comment.