Skip to content

Commit

Permalink
Fixing scaffold test so all_controllers suite runs in cli.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Sep 25, 2010
1 parent d6b747c commit c9a6eba
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cake/tests/cases/libs/controller/scaffold.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ class ScaffoldViewTest extends CakeTestCase {
function startTest() {
$this->request = new CakeRequest(null, false);
$this->Controller = new ScaffoldMockController($this->request);
$this->Controller->response = $this->getMock('CakeResponse', array('_sendHeader'));

App::build(array(
'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS),
Expand Down Expand Up @@ -694,6 +695,7 @@ class ScaffoldTest extends CakeTestCase {
function startTest() {
$request = new CakeRequest(null, false);
$this->Controller = new ScaffoldMockController($request);
$this->Controller->response = $this->getMock('CakeResponse', array('_sendHeader'));
}

/**
Expand Down Expand Up @@ -776,9 +778,6 @@ function testScaffoldVariableSetting() {
$this->assertEqual($result['pluralVar'], 'scaffoldMock');
$this->assertEqual($result['scaffoldFields'], array('id', 'user_id', 'title', 'body', 'published', 'created', 'updated'));
}
function getTests() {
return array('start', 'startCase', 'testScaffoldChangingViewProperty', 'endCase', 'end');
}

/**
* test that Scaffold overrides the view property even if its set to 'Theme'
Expand Down Expand Up @@ -875,6 +874,8 @@ function testHabtmFieldAdditionWithScaffoldForm() {
function testEditScaffoldWithScaffoldFields() {
$request = new CakeRequest(null, false);
$this->Controller = new ScaffoldMockControllerWithFields($request);
$this->Controller->response = $this->getMock('CakeResponse', array('_sendHeader'));

$params = array(
'plugin' => null,
'pass' => array(1),
Expand Down

0 comments on commit c9a6eba

Please sign in to comment.