Permalink
Browse files

Update test app to match new app folder structure.

  • Loading branch information...
1 parent 39075a7 commit 20b993f653043ce2237c32a7c1ac481b5bbc66ba @ADmad ADmad committed Jan 10, 2014
Showing 334 changed files with 87 additions and 88 deletions.
@@ -54,7 +54,7 @@ class IniConfigTest extends TestCase {
*/
public function setUp() {
parent::setUp();
- $this->path = CORE_TESTS . 'TestApp/Config' . DS;
+ $this->path = TEST_APP . 'TestApp/Config' . DS;
}
/**
@@ -54,7 +54,7 @@ class PhpConfigTest extends TestCase {
*/
public function setUp() {
parent::setUp();
- $this->path = CORE_TESTS . 'TestApp/Config' . DS;
+ $this->path = TEST_APP . 'TestApp/Config' . DS;
}
/**
@@ -72,7 +72,7 @@ public function tearDown() {
public function testExecute() {
$this->Task->interactive = false;
- $this->Task->params['paths'] = CORE_TESTS . 'TestApp/View/Pages';
+ $this->Task->params['paths'] = TEST_APP . 'TestApp/View/Pages';
$this->Task->params['output'] = $this->path . DS;
$this->Task->params['extract-core'] = 'no';
$this->Task->expects($this->never())->method('err');
@@ -131,7 +131,7 @@ public function testExecute() {
public function testExtractCategory() {
$this->Task->interactive = false;
- $this->Task->params['paths'] = CORE_TESTS . 'TestApp' . DS . 'View' . DS . 'Pages';
+ $this->Task->params['paths'] = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Pages';
$this->Task->params['output'] = $this->path . DS;
$this->Task->params['extract-core'] = 'no';
$this->Task->params['merge'] = 'no';
@@ -156,7 +156,7 @@ public function testExtractCategory() {
public function testExtractWithExclude() {
$this->Task->interactive = false;
- $this->Task->params['paths'] = CORE_TESTS . 'TestApp/View';
+ $this->Task->params['paths'] = TEST_APP . 'TestApp/View';
$this->Task->params['output'] = $this->path . DS;
$this->Task->params['exclude'] = 'Pages,Layout';
$this->Task->params['extract-core'] = 'no';
@@ -184,8 +184,8 @@ public function testExtractMultiplePaths() {
$this->Task->interactive = false;
$this->Task->params['paths'] =
- CORE_TESTS . 'TestApp/View/Pages,' .
- CORE_TESTS . 'TestApp/View/Posts';
+ TEST_APP . 'TestApp/View/Pages,' .
+ TEST_APP . 'TestApp/View/Posts';
$this->Task->params['output'] = $this->path . DS;
$this->Task->params['extract-core'] = 'no';
@@ -216,7 +216,7 @@ public function testExtractExcludePlugins() {
->method('_isExtractingApp')
->will($this->returnValue(true));
- $this->Task->params['paths'] = CORE_TESTS . 'TestApp/';
+ $this->Task->params['paths'] = TEST_APP . 'TestApp/';
$this->Task->params['output'] = $this->path . DS;
$this->Task->params['exclude-plugins'] = true;
@@ -272,7 +272,7 @@ public function testExtractModelValidation() {
->method('_isExtractingApp')
->will($this->returnValue(true));
- $this->Task->params['paths'] = CORE_TESTS . 'TestApp/';
+ $this->Task->params['paths'] = TEST_APP . 'TestApp/';
$this->Task->params['output'] = $this->path . DS;
$this->Task->params['extract-core'] = 'no';
$this->Task->params['exclude-plugins'] = true;
@@ -351,7 +351,7 @@ public function testExtractOverwrite() {
Configure::write('App.namespace', 'TestApp');
$this->Task->interactive = false;
- $this->Task->params['paths'] = CORE_TESTS . 'TestApp/';
+ $this->Task->params['paths'] = TEST_APP . 'TestApp/';
$this->Task->params['output'] = $this->path . DS;
$this->Task->params['extract-core'] = 'no';
$this->Task->params['overwrite'] = true;
@@ -374,7 +374,7 @@ public function testExtractCore() {
Configure::write('App.namespace', 'TestApp');
$this->Task->interactive = false;
- $this->Task->params['paths'] = CORE_TESTS . 'TestApp/';
+ $this->Task->params['paths'] = TEST_APP . 'TestApp/';
$this->Task->params['output'] = $this->path . DS;
$this->Task->params['extract-core'] = 'yes';
@@ -90,7 +90,7 @@ public function testExecuteWithAbsolutePath() {
* @return void
*/
protected function _cloneRoutes() {
- $File = new File(CORE_TESTS . 'TestApp/Config/routes.php');
+ $File = new File(TEST_APP . 'TestApp/Config/routes.php');
$contents = $File->read();
mkdir(TMP . 'BakeTestApp/Config/', 0777, true);
@@ -592,7 +592,7 @@ public function testBakeWithPlugin() {
* @return void
*/
public function testInteractiveWithPlugin() {
- $testApp = CORE_TESTS . 'TestApp/Plugin/';
+ $testApp = TEST_APP . 'Plugin/';
Plugin::load('TestPlugin');
$this->Task->plugin = 'TestPlugin';
@@ -32,7 +32,7 @@ class IniAclTest extends TestCase {
* @return void
*/
public function testCheck() {
- $iniFile = CORE_TESTS . 'TestApp/Config/acl.ini.php';
+ $iniFile = TEST_APP . 'TestApp/Config/acl.ini.php';
$Ini = new IniAcl();
$Ini->config = $Ini->readConfigFile($iniFile);
@@ -55,7 +55,7 @@ public function testCheck() {
* @return void
*/
public function testCheckArray() {
- $iniFile = CORE_TESTS . 'TestApp/Config/acl.ini.php';
+ $iniFile = TEST_APP . 'TestApp/Config/acl.ini.php';
$Ini = new IniAcl();
$Ini->config = $Ini->readConfigFile($iniFile);
@@ -39,7 +39,7 @@ public function setUp() {
$this->PhpAcl = new PhpAcl();
$this->Acl = new AclComponent($Collection, array(
'adapter' => array(
- 'config' => CORE_TESTS . 'TestApp/Config/acl.php',
+ 'config' => TEST_APP . 'TestApp/Config/acl.php',
),
));
}
@@ -119,7 +119,7 @@ public function classnameProvider() {
* @return void
*/
public function testPathWithPlugins() {
- $basepath = CORE_TESTS . 'TestApp' . DS . 'Plugin' . DS;
+ $basepath = TEST_APP . 'Plugin' . DS;
Plugin::load('TestPlugin');
$result = App::path('Controller', 'TestPlugin');
@@ -195,7 +195,7 @@ public function testListObjects() {
* Make sure that .svn and friends are excluded from App::objects('Plugin')
*/
public function testListObjectsIgnoreDotDirectories() {
- $path = CORE_TESTS . 'TestApp/Plugin/';
+ $path = TEST_APP . 'Plugin/';
$this->skipIf(!is_writable($path), $path . ' is not writable.');
@@ -244,11 +244,11 @@ public function testPluginPath() {
Plugin::load(array('TestPlugin', 'TestPluginTwo'));
$path = App::pluginPath('TestPlugin');
- $expected = CORE_TESTS . 'TestApp' . DS . 'Plugin' . DS . 'TestPlugin' . DS;
+ $expected = TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS;
$this->assertEquals($expected, $path);
$path = App::pluginPath('TestPluginTwo');
- $expected = CORE_TESTS . 'TestApp' . DS . 'Plugin' . DS . 'TestPluginTwo' . DS;
+ $expected = TEST_APP . 'Plugin' . DS . 'TestPluginTwo' . DS;
$this->assertEquals($expected, $path);
}
@@ -259,11 +259,11 @@ public function testPluginPath() {
*/
public function testThemePath() {
$path = App::themePath('test_theme');
- $expected = CORE_TESTS . 'TestApp' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS;
+ $expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS;
$this->assertEquals($expected, $path);
$path = App::themePath('TestTheme');
- $expected = CORE_TESTS . 'TestApp' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS;
+ $expected = TEST_APP . 'TestApp' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS;
$this->assertEquals($expected, $path);
}
@@ -265,7 +265,7 @@ public function testLoadDefaultConfig() {
* @return void
*/
public function testLoadWithMerge() {
- Configure::config('test', new PhpConfig(CORE_TESTS . 'TestApp/Config/'));
+ Configure::config('test', new PhpConfig(TEST_APP . 'TestApp/Config/'));
$result = Configure::load('var_test', 'test');
$this->assertTrue($result);
@@ -288,7 +288,7 @@ public function testLoadWithMerge() {
* @return void
*/
public function testLoadNoMerge() {
- Configure::config('test', new PhpConfig(CORE_TESTS . 'TestApp/Config/'));
+ Configure::config('test', new PhpConfig(TEST_APP . 'TestApp/Config/'));
$result = Configure::load('var_test', 'test');
$this->assertTrue($result);
@@ -313,13 +313,13 @@ public function testLoadPlugin() {
Plugin::load('TestPlugin');
$result = Configure::load('TestPlugin.load', 'test');
$this->assertTrue($result);
- $expected = '/test_app/plugins/test_plugin/config/load.php';
+ $expected = '/test_app/Plugin/TestPlugin/Config/load.php';
$config = Configure::read('plugin_load');
$this->assertEquals($expected, $config);
$result = Configure::load('TestPlugin.more.load', 'test');
$this->assertTrue($result);
- $expected = '/test_app/plugins/test_plugin/config/more.load.php';
+ $expected = '/test_app/Plugin/TestPlugin/Config/more.load.php';
$config = Configure::read('plugin_more_load');
$this->assertEquals($expected, $config);
Plugin::unload();
@@ -220,10 +220,10 @@ public function testLoadNotFound() {
*/
public function testPath() {
Plugin::load(array('TestPlugin', 'TestPluginTwo'));
- $expected = CORE_TESTS . 'TestApp' . DS . 'Plugin' . DS . 'TestPlugin' . DS;
+ $expected = TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS;
$this->assertEquals(Plugin::path('TestPlugin'), $expected);
- $expected = CORE_TESTS . 'TestApp' . DS . 'Plugin' . DS . 'TestPluginTwo' . DS;
+ $expected = TEST_APP . 'Plugin' . DS . 'TestPluginTwo' . DS;
$this->assertEquals(Plugin::path('TestPluginTwo'), $expected);
}
@@ -1083,7 +1083,7 @@ public function testSendNoTemplateWithDataStringAttachment() {
$this->CakeEmail->to('cake@cakephp.org');
$this->CakeEmail->subject('My title');
$this->CakeEmail->emailFormat('text');
- $data = file_get_contents(CORE_TESTS . 'TestApp/webroot/img/cake.power.gif');
+ $data = file_get_contents(TEST_APP . 'webroot/img/cake.power.gif');
$this->CakeEmail->attachments(array('cake.icon.gif' => array(
'data' => $data,
'mimetype' => 'image/gif'
@@ -1089,7 +1089,7 @@ public function testFile() {
->method('_isActive')
->will($this->returnValue(true));
- $response->file(CORE_TESTS . 'TestApp/vendor/css/test_asset.css');
+ $response->file(TEST_APP . 'vendor/css/test_asset.css');
ob_start();
$result = $response->send();
@@ -1144,7 +1144,7 @@ public function testFileWithDownloadAndName() {
->will($this->returnValue(true));
$response->file(
- CORE_TESTS . 'TestApp' . DS . 'vendor' . DS . 'css' . DS . 'test_asset.css',
+ TEST_APP . 'vendor' . DS . 'css' . DS . 'test_asset.css',
array(
'name' => 'something_special.css',
'download' => true,
@@ -1206,7 +1206,7 @@ public function testFileWithUnknownFileTypeGeneric() {
->method('_isActive')
->will($this->returnValue(true));
- $response->file(CORE_TESTS . 'TestApp/Config/no_section.ini');
+ $response->file(TEST_APP . 'TestApp/Config/no_section.ini');
ob_start();
$result = $response->send();
@@ -1270,7 +1270,7 @@ public function testFileWithUnknownFileTypeOpera() {
->method('_isActive')
->will($this->returnValue(true));
- $response->file(CORE_TESTS . 'TestApp/Config/no_section.ini');
+ $response->file(TEST_APP . 'TestApp/Config/no_section.ini');
ob_start();
$result = $response->send();
@@ -1334,7 +1334,7 @@ public function testFileWithUnknownFileTypeIE() {
->method('_isActive')
->will($this->returnValue(true));
- $response->file(CORE_TESTS . 'TestApp/Config/no_section.ini', array(
+ $response->file(TEST_APP . 'TestApp/Config/no_section.ini', array(
'name' => 'config.ini'
));
@@ -1375,7 +1375,7 @@ public function testFileWithUnknownFileNoDownload() {
$response->expects($this->never())
->method('download');
- $response->file(CORE_TESTS . 'TestApp/Config/no_section.ini', array(
+ $response->file(TEST_APP . 'TestApp/Config/no_section.ini', array(
'download' => false
));
@@ -1413,7 +1413,7 @@ public function testConnectionAbortedOnBuffering() {
$response->expects($this->once())->method('_clearBuffer');
$response->expects($this->never())->method('_flushBuffer');
- $response->file(CORE_TESTS . 'TestApp/vendor/css/test_asset.css');
+ $response->file(TEST_APP . 'vendor/css/test_asset.css');
$result = $response->send();
$this->assertNull($result);
@@ -1445,7 +1445,7 @@ public function testFileUpperExtension() {
->method('_isActive')
->will($this->returnValue(true));
- $response->file(CORE_TESTS . 'TestApp/vendor/img/test_2.JPG');
+ $response->file(TEST_APP . 'vendor/img/test_2.JPG');
}
/**
@@ -1474,7 +1474,7 @@ public function testFileExtensionNotSet() {
->method('_isActive')
->will($this->returnValue(true));
- $response->file(CORE_TESTS . 'TestApp/vendor/img/test_2.JPG');
+ $response->file(TEST_APP . 'vendor/img/test_2.JPG');
}
/**
@@ -1542,7 +1542,7 @@ public function testFileRangeOffsets($range, $length, $offsetResponse) {
->will($this->returnValue(true));
$response->file(
- CORE_TESTS . 'TestApp' . DS . 'vendor' . DS . 'css' . DS . 'test_asset.css',
+ TEST_APP . 'vendor' . DS . 'css' . DS . 'test_asset.css',
array('download' => true)
);
@@ -1599,7 +1599,7 @@ public function testFileRange() {
->will($this->returnValue(true));
$response->file(
- CORE_TESTS . 'TestApp' . DS . 'vendor' . DS . 'css' . DS . 'test_asset.css',
+ TEST_APP . 'vendor' . DS . 'css' . DS . 'test_asset.css',
array('download' => true)
);
@@ -1647,7 +1647,7 @@ public function testFileRangeInvalid() {
));
$response->file(
- CORE_TESTS . 'TestApp' . DS . 'vendor' . DS . 'css' . DS . 'test_asset.css',
+ TEST_APP . 'vendor' . DS . 'css' . DS . 'test_asset.css',
array('download' => true)
);
@@ -757,31 +757,31 @@ public static function assetProvider() {
return array(
array(
'theme/test_theme/flash/theme_test.swf',
- 'View/Themed/TestTheme/webroot/flash/theme_test.swf'
+ 'TestApp/View/Themed/TestTheme/webroot/flash/theme_test.swf'
),
array(
'theme/test_theme/pdfs/theme_test.pdf',
- 'View/Themed/TestTheme/webroot/pdfs/theme_test.pdf'
+ 'TestApp/View/Themed/TestTheme/webroot/pdfs/theme_test.pdf'
),
array(
'theme/test_theme/img/test.jpg',
- 'View/Themed/TestTheme/webroot/img/test.jpg'
+ 'TestApp/View/Themed/TestTheme/webroot/img/test.jpg'
),
array(
'theme/test_theme/css/test_asset.css',
- 'View/Themed/TestTheme/webroot/css/test_asset.css'
+ 'TestApp/View/Themed/TestTheme/webroot/css/test_asset.css'
),
array(
'theme/test_theme/js/theme.js',
- 'View/Themed/TestTheme/webroot/js/theme.js'
+ 'TestApp/View/Themed/TestTheme/webroot/js/theme.js'
),
array(
'theme/test_theme/js/one/theme_one.js',
- 'View/Themed/TestTheme/webroot/js/one/theme_one.js'
+ 'TestApp/View/Themed/TestTheme/webroot/js/one/theme_one.js'
),
array(
'theme/test_theme/space%20image.text',
- 'View/Themed/TestTheme/webroot/space image.text'
+ 'TestApp/View/Themed/TestTheme/webroot/space image.text'
),
array(
'test_plugin/root.js',
@@ -845,7 +845,7 @@ public function testAsset($url, $file) {
$Dispatcher->dispatch(new Request($url), $response);
$result = ob_get_clean();
- $path = CORE_TESTS . 'TestApp/' . str_replace('/', DS, $file);
+ $path = TEST_APP . str_replace('/', DS, $file);
$file = file_get_contents($path);
$this->assertEquals($file, $result);
Oops, something went wrong.

0 comments on commit 20b993f

Please sign in to comment.