Skip to content

Commit

Permalink
Fixing remaining tests related to themes
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed May 20, 2014
1 parent 67207db commit aa3a44e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 24 deletions.
6 changes: 0 additions & 6 deletions tests/TestCase/Controller/PagesControllerTest.php
Expand Up @@ -42,12 +42,6 @@ public function testDisplay() {
$Pages->display('index');
$this->assertRegExp('/posts index/', $Pages->response->body());
$this->assertEquals('index', $Pages->viewVars['page']);

$Pages->viewPath = 'Themed';
$Pages->display('TestTheme', 'Posts', 'index');
$this->assertRegExp('/posts index themed view/', $Pages->response->body());
$this->assertEquals('TestTheme', $Pages->viewVars['page']);
$this->assertEquals('Posts', $Pages->viewVars['subpage']);
}

/**
Expand Down
15 changes: 0 additions & 15 deletions tests/TestCase/Core/AppTest.php
Expand Up @@ -248,19 +248,4 @@ public function testPluginPath() {
$this->assertPathEquals($expected, $path);
}

/**
* test that themePath can find paths for themes.
*
* @return void
*/
public function testThemePath() {
$path = App::themePath('test_theme');
$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Themed' . DS . 'TestTheme' . DS;
$this->assertPathEquals($expected, $path);

$path = App::themePath('TestTheme');
$expected = TEST_APP . 'TestApp' . DS . 'Template' . DS . 'Themed' . DS . 'TestTheme' . DS;
$this->assertPathEquals($expected, $path);
}

}
4 changes: 2 additions & 2 deletions tests/TestCase/Core/PluginTest.php
Expand Up @@ -244,7 +244,7 @@ public function testPathNotFound() {
*/
public function testLoadAll() {
Plugin::loadAll();
$expected = ['Company', 'PluginJs', 'TestPlugin', 'TestPluginTwo'];
$expected = ['Company', 'PluginJs', 'TestPlugin', 'TestPluginTwo', 'TestTheme'];
$this->assertEquals($expected, Plugin::loaded());
}

Expand All @@ -267,7 +267,7 @@ public function testLoadAllWithPluginAlreadyLoaded() {
public function testLoadAllWithDefaults() {
$defaults = array('bootstrap' => true, 'ignoreMissing' => true);
Plugin::loadAll(array($defaults));
$expected = ['Company', 'PluginJs', 'TestPlugin', 'TestPluginTwo'];
$expected = ['Company', 'PluginJs', 'TestPlugin', 'TestPluginTwo', 'TestTheme'];
$this->assertEquals($expected, Plugin::loaded());
$this->assertEquals('loaded js plugin bootstrap', Configure::read('PluginTest.js_plugin.bootstrap'));
$this->assertEquals('loaded plugin bootstrap', Configure::read('PluginTest.test_plugin.bootstrap'));
Expand Down
3 changes: 2 additions & 1 deletion tests/TestCase/Network/Email/EmailTest.php
Expand Up @@ -1471,6 +1471,7 @@ public function testSendRenderJapanese() {
* @return void
*/
public function testSendRenderThemed() {
Plugin::load('TestTheme');
$this->CakeEmail->reset();
$this->CakeEmail->transport('debug');

Expand Down Expand Up @@ -1613,7 +1614,7 @@ public function testSendRenderWithImage() {
* @return void
*/
public function testSendRenderPlugin() {
Plugin::load(['TestPlugin', 'TestPluginTwo']);
Plugin::load(['TestPlugin', 'TestPluginTwo', 'TestTheme']);

$this->CakeEmail->reset();
$this->CakeEmail->transport('debug');
Expand Down

0 comments on commit aa3a44e

Please sign in to comment.