Fixing some failing tests.

This commit is contained in:
mark_story 2011-02-05 01:40:14 -05:00
parent 8d7df1721c
commit f5383a2243
2 changed files with 26 additions and 25 deletions

View file

@ -58,27 +58,28 @@ class ApiShellTest extends CakeTestCase {
$expected = array( $expected = array(
'1. afterFilter()', '1. afterFilter()',
'2. beforeFilter()', '2. beforeFilter()',
'3. beforeRender()', '3. beforeRedirect($url, $status = NULL, $exit = true)',
'4. constructClasses()', '4. beforeRender()',
'5. disableCache()', '5. constructClasses()',
'6. flash($message, $url, $pause = 1, $layout = \'flash\')', '6. disableCache()',
'7. getResponse()', '7. flash($message, $url, $pause = 1, $layout = \'flash\')',
'8. header($status)', '8. getResponse()',
'9. httpCodes($code = NULL)', '9. header($status)',
'10. isAuthorized()', '10. httpCodes($code = NULL)',
'11. loadModel($modelClass = NULL, $id = NULL)', '11. isAuthorized()',
'12. paginate($object = NULL, $scope = array (), $whitelist = array ())', '12. loadModel($modelClass = NULL, $id = NULL)',
'13. postConditions($data = array (), $op = NULL, $bool = \'AND\', $exclusive = false)', '13. paginate($object = NULL, $scope = array (), $whitelist = array ())',
'14. redirect($url, $status = NULL, $exit = true)', '14. postConditions($data = array (), $op = NULL, $bool = \'AND\', $exclusive = false)',
'15. referer($default = NULL, $local = false)', '15. redirect($url, $status = NULL, $exit = true)',
'16. render($action = NULL, $layout = NULL, $file = NULL)', '16. referer($default = NULL, $local = false)',
'17. set($one, $two = NULL)', '17. render($action = NULL, $layout = NULL, $file = NULL)',
'18. setAction($action)', '18. set($one, $two = NULL)',
'19. setRequest($request)', '19. setAction($action)',
'20. shutdownProcess()', '20. setRequest($request)',
'21. startupProcess()', '21. shutdownProcess()',
'22. validate()', '22. startupProcess()',
'23. validateErrors()' '23. validate()',
'24. validateErrors()'
); );
$this->Shell->expects($this->at(2))->method('out')->with($expected); $this->Shell->expects($this->at(2))->method('out')->with($expected);

View file

@ -441,10 +441,10 @@ class TestTaskTest extends CakeTestCase {
$this->assertContains("App::import('Model', 'TestTaskArticle')", $result); $this->assertContains("App::import('Model', 'TestTaskArticle')", $result);
$this->assertContains('class TestTaskArticleTestCase extends CakeTestCase', $result); $this->assertContains('class TestTaskArticleTestCase extends CakeTestCase', $result);
$this->assertContains('function startTest()', $result); $this->assertContains('function setUp()', $result);
$this->assertContains("\$this->TestTaskArticle = ClassRegistry::init('TestTaskArticle')", $result); $this->assertContains("\$this->TestTaskArticle = ClassRegistry::init('TestTaskArticle')", $result);
$this->assertContains('function endTest()', $result); $this->assertContains('function tearDown()', $result);
$this->assertContains('unset($this->TestTaskArticle)', $result); $this->assertContains('unset($this->TestTaskArticle)', $result);
$this->assertContains('function testDoSomething()', $result); $this->assertContains('function testDoSomething()', $result);
@ -476,11 +476,11 @@ class TestTaskTest extends CakeTestCase {
$this->assertContains('public $autoRender = false', $result); $this->assertContains('public $autoRender = false', $result);
$this->assertContains('function redirect($url, $status = null, $exit = true)', $result); $this->assertContains('function redirect($url, $status = null, $exit = true)', $result);
$this->assertContains('function startTest()', $result); $this->assertContains('function setUp()', $result);
$this->assertContains("\$this->TestTaskComments = new TestTestTaskCommentsController()", $result); $this->assertContains("\$this->TestTaskComments = new TestTestTaskCommentsController()", $result);
$this->assertContains("\$this->TestTaskComments->constructClasses()", $result); $this->assertContains("\$this->TestTaskComments->constructClasses()", $result);
$this->assertContains('function endTest()', $result); $this->assertContains('function tearDown()', $result);
$this->assertContains('unset($this->TestTaskComments)', $result); $this->assertContains('unset($this->TestTaskComments)', $result);
$this->assertContains("'app.test_task_article'", $result); $this->assertContains("'app.test_task_article'", $result);