Skip to content

Commit

Permalink
Fixing Scaffold tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed May 17, 2011
1 parent 1b14887 commit 12e7347
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Cake/Test/Case/Controller/ScaffoldTest.php
Expand Up @@ -282,6 +282,7 @@ function setUp() {
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
}

/**
Expand All @@ -292,6 +293,7 @@ function setUp() {
function tearDown() {
parent::tearDown();
unset($this->Controller, $this->request);
CakePlugin::unload();
}

/**
Expand Down Expand Up @@ -369,12 +371,12 @@ function testGetViewFilename() {
$ScaffoldView = new TestScaffoldView($Controller);
$result = $ScaffoldView->testGetFilename('admin_add');
$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin'
. DS .'test_plugin' . DS . 'View' . DS . 'tests' . DS . 'scaffold.form.ctp';
. DS .'TestPlugin' . DS . 'View' . DS . 'Tests' . DS . 'scaffold.form.ctp';
$this->assertEqual($expected, $result);

$result = $ScaffoldView->testGetFilename('add');
$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin'
. DS .'test_plugin' . DS . 'View' . DS . 'tests' . DS . 'scaffold.form.ctp';
. DS .'TestPlugin' . DS . 'View' . DS . 'Tests' . DS . 'scaffold.form.ctp';
$this->assertEqual($expected, $result);

Configure::write('Routing.prefixes', $_admin);
Expand Down

0 comments on commit 12e7347

Please sign in to comment.