diff --git a/lib/Cake/Console/Command/ApiShell.php b/lib/Cake/Console/Command/ApiShell.php index 3e6fab460..260e68b28 100644 --- a/lib/Cake/Console/Command/ApiShell.php +++ b/lib/Cake/Console/Command/ApiShell.php @@ -41,14 +41,14 @@ class ApiShell extends Shell { */ public function initialize() { $this->paths = array_merge($this->paths, array( - 'behavior' => LIBS . 'Model' . DS . 'Behavior' . DS, - 'cache' => LIBS . 'Cache' . DS, - 'controller' => LIBS . 'Controller' . DS, - 'component' => LIBS . 'Controller' . DS . 'Component' . DS, - 'helper' => LIBS . 'View' . DS . 'Helper' . DS, - 'model' => LIBS . 'Model' . DS, - 'view' => LIBS . 'View' . DS, - 'core' => LIBS + 'behavior' => CAKE . 'Model' . DS . 'Behavior' . DS, + 'cache' => CAKE . 'Cache' . DS, + 'controller' => CAKE . 'Controller' . DS, + 'component' => CAKE . 'Controller' . DS . 'Component' . DS, + 'helper' => CAKE . 'View' . DS . 'Helper' . DS, + 'model' => CAKE . 'Model' . DS, + 'view' => CAKE . 'View' . DS, + 'core' => CAKE )); } diff --git a/lib/Cake/Console/Command/Task/ProjectTask.php b/lib/Cake/Console/Command/Task/ProjectTask.php index c2f9abf47..9793be3b2 100644 --- a/lib/Cake/Console/Command/Task/ProjectTask.php +++ b/lib/Cake/Console/Command/Task/ProjectTask.php @@ -202,7 +202,7 @@ class ProjectTask extends Shell { public function createHome($dir) { $app = basename($dir); $path = $dir . 'View' . DS . 'pages' . DS; - $source = LIBS . 'Console' . DS . 'templates' . DS .'default' . DS . 'views' . DS . 'home.ctp'; + $source = CAKE . 'Console' . DS . 'templates' . DS .'default' . DS . 'views' . DS . 'home.ctp'; include($source); return $this->createFile($path.'home.ctp', $output); } @@ -218,7 +218,7 @@ class ProjectTask extends Shell { $File = new File($path . 'Console' . DS . 'cake.php'); $contents = $File->read(); if (preg_match('/(__CAKE_PATH__)/', $contents, $match)) { - $path = LIBS . 'Console' . DS; + $path = CAKE . 'Console' . DS; $replacement = "'" . str_replace(DS, "' . DIRECTORY_SEPARATOR . '", $path) . "'"; $result = str_replace($match[0], $replacement, $contents); if ($File->write($result)) { @@ -260,7 +260,7 @@ class ProjectTask extends Shell { $contents = $File->read(); if (preg_match('/([\s]*Configure::write\(\'Security.cipherSeed\',[\s\'A-z0-9]*\);)/', $contents, $match)) { if (!class_exists('Security')) { - require LIBS . 'Utility' . DS . 'security.php'; + require CAKE . 'Utility' . DS . 'security.php'; } $string = substr(bin2hex(Security::generateAuthKey()), 0, 30); $result = str_replace($match[0], "\t" . 'Configure::write(\'Security.cipherSeed\', \''.$string.'\');', $contents); diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index f5ac9a63a..423271b25 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -563,7 +563,7 @@ class App { if (empty($plugin)) { $appLibs = empty(self::$__packages['Lib']) ? APPLIBS : current(self::$__packages['Lib']); $paths[] = $appLibs . $package . DS; - $paths[] = LIBS . $package . DS; + $paths[] = CAKE . $package . DS; } foreach ($paths as $path) { @@ -845,4 +845,4 @@ class App { Cache::write('object_map', self::$__objects, '_cake_core_'); } } -} \ No newline at end of file +} diff --git a/lib/Cake/Core/Configure.php b/lib/Cake/Core/Configure.php index 4cf575775..65fd12f83 100644 --- a/lib/Cake/Core/Configure.php +++ b/lib/Cake/Core/Configure.php @@ -295,7 +295,7 @@ class Configure { return false; } $values = self::$_readers[$config]->read($key); - + if ($merge) { $keys = array_keys($values); foreach ($keys as $key) { @@ -304,7 +304,7 @@ class Configure { } } } - + return self::write($values); } @@ -318,7 +318,7 @@ class Configure { */ public static function version() { if (!isset(self::$_values['Cake']['version'])) { - require(LIBS . 'Config' . DS . 'config.php'); + require(CAKE . 'Config' . DS . 'config.php'); self::write($config); } return self::$_values['Cake']['version']; @@ -373,4 +373,4 @@ interface ConfigReaderInterface { * @return array An array of data to merge into the runtime configuration */ function read($key); -} \ No newline at end of file +} diff --git a/lib/Cake/Core/Object.php b/lib/Cake/Core/Object.php index 28a3d0d29..345a4ca67 100644 --- a/lib/Cake/Core/Object.php +++ b/lib/Cake/Core/Object.php @@ -74,7 +74,7 @@ class Object { $extra['url'] = array(); } $extra = array_merge(array('autoRender' => 0, 'return' => 1, 'bare' => 1, 'requested' => 1), $extra); - + if (is_string($url)) { $request = new CakeRequest($url); } elseif (is_array($url)) { @@ -119,7 +119,7 @@ class Object { } /** - * Stop execution of the current script. Wraps exit() making + * Stop execution of the current script. Wraps exit() making * testing easier. * * @param $status see http://php.net/exit for values @@ -139,7 +139,7 @@ class Object { */ public function log($msg, $type = LOG_ERROR) { if (!class_exists('CakeLog')) { - require LIBS . 'cake_log.php'; + require CAKE . 'cake_log.php'; } if (!is_string($msg)) { $msg = print_r($msg, true); @@ -148,7 +148,7 @@ class Object { } /** - * Allows setting of multiple properties of the object in a single line of code. Will only set + * Allows setting of multiple properties of the object in a single line of code. Will only set * properties that are part of a class declaration. * * @param array $properties An associative array containing properties and corresponding values. @@ -213,7 +213,7 @@ class Object { foreach ($properties as $var) { if ( isset($classProperties[$var]) && - !empty($classProperties[$var]) && + !empty($classProperties[$var]) && is_array($this->{$var}) && $this->{$var} != $classProperties[$var] ) { diff --git a/lib/Cake/Model/Behavior/AclBehavior.php b/lib/Cake/Model/Behavior/AclBehavior.php index ae72d960e..564c26e7f 100644 --- a/lib/Cake/Model/Behavior/AclBehavior.php +++ b/lib/Cake/Model/Behavior/AclBehavior.php @@ -49,7 +49,7 @@ class AclBehavior extends ModelBehavior { $types = $this->__typeMaps[$this->settings[$model->name]['type']]; if (!class_exists('AclNode')) { - require LIBS . 'model' . DS . 'db_acl.php'; + require CAKE . 'model' . DS . 'db_acl.php'; } if (!is_array($types)) { $types = array($types); diff --git a/lib/Cake/Test/Case/BasicsTest.php b/lib/Cake/Test/Case/BasicsTest.php index 6866d03d5..5aef0ed4e 100644 --- a/lib/Cake/Test/Case/BasicsTest.php +++ b/lib/Cake/Test/Case/BasicsTest.php @@ -34,7 +34,7 @@ class BasicsTest extends CakeTestCase { */ public function setUp() { App::build(array( - 'locales' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Locale' . DS) + 'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS) )); $this->_language = Configure::read('Config.language'); } @@ -206,7 +206,7 @@ class BasicsTest extends CakeTestCase { $string = ' &  '; $result = h($string, false); $this->assertEqual('<foo> &  ', $result); - + $string = ' &  '; $result = h($string, 'UTF-8'); $this->assertEqual('<foo> & &nbsp;', $result); @@ -226,7 +226,7 @@ class BasicsTest extends CakeTestCase { ' ' ); $this->assertEqual($expected, $result); - + $arr = array('f' => '', 'n' => ' '); $result = h($arr, false); $expected = array( diff --git a/lib/Cake/Test/Case/Cache/CacheTest.php b/lib/Cake/Test/Case/Cache/CacheTest.php index a51881f83..7be4bb7b5 100644 --- a/lib/Cake/Test/Case/Cache/CacheTest.php +++ b/lib/Cake/Test/Case/Cache/CacheTest.php @@ -89,8 +89,8 @@ class CacheTest extends CakeTestCase { */ function testConfigWithLibAndPluginEngines() { App::build(array( - 'Lib' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Lib' . DS), - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'Lib' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) ), true); CakePlugin::load('TestPlugin'); @@ -252,8 +252,8 @@ class CacheTest extends CakeTestCase { */ function testDrop() { App::build(array( - 'libs' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Lib' . DS), - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) ), true); $result = Cache::drop('some_config_that_does_not_exist'); @@ -305,10 +305,10 @@ class CacheTest extends CakeTestCase { */ function testWriteTriggerError() { App::build(array( - 'libs' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Lib' . DS), - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) ), true); - + Cache::config('test_trigger', array('engine' => 'TestAppCache', 'prefix' => '')); try { Cache::write('fail', 'value', 'test_trigger'); @@ -400,7 +400,7 @@ class CacheTest extends CakeTestCase { Cache::config('file_config', array('engine' => 'File', 'prefix' => 'test_file_')); Cache::set(array('duration' => '+1 year'), 'file_config'); $settings = Cache::settings('file_config'); - + $this->assertEquals('test_file_', $settings['prefix']); $this->assertEquals(strtotime('+1 year') - time(), $settings['duration']); } diff --git a/lib/Cake/Test/Case/Configure/IniReaderTest.php b/lib/Cake/Test/Case/Configure/IniReaderTest.php index a03313886..579c57eaa 100644 --- a/lib/Cake/Test/Case/Configure/IniReaderTest.php +++ b/lib/Cake/Test/Case/Configure/IniReaderTest.php @@ -34,7 +34,7 @@ class IniReaderTest extends CakeTestCase { */ function setup() { parent::setup(); - $this->path = LIBS . 'Test' . DS . 'test_app' . DS . 'Config'. DS; + $this->path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS; } /** @@ -125,4 +125,4 @@ class IniReaderTest extends CakeTestCase { $config = $reader->read('nested'); $this->assertTrue($config['bools']['test_on']); } -} \ No newline at end of file +} diff --git a/lib/Cake/Test/Case/Configure/PhpReaderTest.php b/lib/Cake/Test/Case/Configure/PhpReaderTest.php index 1de4c2471..060a41fe0 100644 --- a/lib/Cake/Test/Case/Configure/PhpReaderTest.php +++ b/lib/Cake/Test/Case/Configure/PhpReaderTest.php @@ -26,7 +26,7 @@ class PhpReaderTest extends CakeTestCase { */ function setUp() { parent::setUp(); - $this->path = LIBS . 'Test' . DS . 'test_app' . DS . 'Config'. DS; + $this->path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS; } /** * test reading files @@ -83,7 +83,7 @@ class PhpReaderTest extends CakeTestCase { */ function testReadPluginValue() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) ), true); CakePlugin::load('TestPlugin'); $reader = new PhpReader($this->path); diff --git a/lib/Cake/Test/Case/Console/Command/ApiShellTest.php b/lib/Cake/Test/Case/Console/Command/ApiShellTest.php index 045611ab3..5376569dc 100644 --- a/lib/Cake/Test/Case/Console/Command/ApiShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/ApiShellTest.php @@ -82,7 +82,7 @@ class ApiShellTest extends CakeTestCase { $this->Shell->expects($this->at(2))->method('out')->with($expected); $this->Shell->args = array('controller'); - $this->Shell->paths['controller'] = LIBS . 'Controller' . DS; + $this->Shell->paths['controller'] = CAKE . 'Controller' . DS; $this->Shell->main(); } } diff --git a/lib/Cake/Test/Case/Console/Command/CommandListShellTest.php b/lib/Cake/Test/Case/Console/Command/CommandListShellTest.php index 4244354f0..d30214777 100644 --- a/lib/Cake/Test/Case/Console/Command/CommandListShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/CommandListShellTest.php @@ -41,10 +41,10 @@ class CommandListTest extends CakeTestCase { parent::setUp(); App::build(array( 'plugins' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS + CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS ), 'Console/Command' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS + CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS ) ), true); CakePlugin::loadAll(); @@ -130,7 +130,7 @@ class CommandListTest extends CakeTestCase { $expected = "/\[.*TestPlugin.*\]\n[ ]+example/"; $this->assertPattern($expected, $output); - + $expected = "/\[.*Core.*\]\n[ ]+acl, api, bake, command_list, console, i18n, schema, testsuite/"; $this->assertPattern($expected, $output); } diff --git a/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php b/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php index 3bd3b71ed..52a878630 100644 --- a/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php @@ -97,7 +97,7 @@ class SchemaShellTest extends CakeTestCase { * @var array * @access public */ - public $fixtures = array('core.article', 'core.user', 'core.post', 'core.auth_user', 'core.author', + public $fixtures = array('core.article', 'core.user', 'core.post', 'core.auth_user', 'core.author', 'core.comment', 'core.test_plugin_comment' ); @@ -187,7 +187,7 @@ class SchemaShellTest extends CakeTestCase { */ public function testViewWithPlugins() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) )); CakePlugin::load('TestPlugin'); $this->Shell->args = array('TestPlugin.schema'); @@ -238,7 +238,7 @@ class SchemaShellTest extends CakeTestCase { */ public function testDumpFileWritingWithPlugins() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) )); CakePlugin::load('TestPlugin'); $this->Shell->args = array('TestPlugin.TestPluginApp'); @@ -314,7 +314,7 @@ class SchemaShellTest extends CakeTestCase { $this->Shell->expects($this->at(2))->method('out') ->with(new PHPUnit_Framework_Constraint_PCREMatch('/Schema file:\s[a-z\.]+\sgenerated/')); - + $this->Shell->Schema = $this->getMock('CakeSchema'); $this->Shell->Schema->path = TMP; $this->Shell->Schema->expects($this->once())->method('read')->will($this->returnValue(array('schema data'))); @@ -336,7 +336,7 @@ class SchemaShellTest extends CakeTestCase { */ public function testGenerateWithPlugins() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) ), true); CakePlugin::load('TestPlugin'); @@ -377,7 +377,7 @@ class SchemaShellTest extends CakeTestCase { $this->Shell->create(); $db = ConnectionManager::getDataSource('test'); - + $db->cacheSources = false; $sources = $db->listSources(); $this->assertTrue(in_array($db->config['prefix'] . 'i18n', $sources)); @@ -439,7 +439,7 @@ class SchemaShellTest extends CakeTestCase { $this->Shell->expects($this->any())->method('in')->will($this->returnValue('y')); $this->Shell->expects($this->once())->method('__run') ->with($this->arrayHasKey('articles'), 'update', $this->isInstanceOf('CakeSchema')); - + $this->Shell->update(); } @@ -450,7 +450,7 @@ class SchemaShellTest extends CakeTestCase { */ public function testPluginParam() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) )); CakePlugin::load('TestPlugin'); $this->Shell->params = array( @@ -458,7 +458,7 @@ class SchemaShellTest extends CakeTestCase { 'connection' => 'test' ); $this->Shell->startup(); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'Config' . DS . 'Schema'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'Config' . DS . 'Schema'; $this->assertEqual($this->Shell->Schema->path, $expected); CakePlugin::unload(); } diff --git a/lib/Cake/Test/Case/Console/Command/ShellTest.php b/lib/Cake/Test/Case/Console/Command/ShellTest.php index 28ddef756..81438269f 100644 --- a/lib/Cake/Test/Case/Console/Command/ShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/ShellTest.php @@ -57,17 +57,17 @@ class ShellTestShell extends Shell { } public function do_something() { - + } - + public function _secret() { - + } - + protected function no_access() { - + } - + public function mergeVars($properties, $class, $normalize = true) { return $this->_mergeVars($properties, $class, $normalize); } @@ -169,8 +169,8 @@ class ShellTest extends CakeTestCase { */ public function testInitialize() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), - 'models' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), + 'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS) ), true); $this->Shell->uses = array('TestPlugin.TestPluginPost'); @@ -408,7 +408,7 @@ class ShellTest extends CakeTestCase { * * @return void */ - public function testLoadTasks() { + public function testLoadTasks() { $this->assertTrue($this->Shell->loadTasks()); $this->Shell->tasks = null; @@ -451,9 +451,9 @@ class ShellTest extends CakeTestCase { $this->Shell->params = array('help' => false); $this->Shell->loadTasks(); $result = $this->Shell->TestApple; - + $this->Shell->args = array('one', 'two'); - + $this->assertSame($this->Shell->args, $result->args); $this->assertSame($this->Shell->params, $result->params); } @@ -546,7 +546,7 @@ class ShellTest extends CakeTestCase { $this->Shell->stdin->expects($this->at(0)) ->method('read') ->will($this->returnValue('n')); - + $this->Shell->stdin->expects($this->at(1)) ->method('read') ->will($this->returnValue('y')); @@ -651,11 +651,11 @@ class ShellTest extends CakeTestCase { function testHasTask() { $this->Shell->tasks = array('Extract', 'DbConfig'); $this->Shell->loadTasks(); - + $this->assertTrue($this->Shell->hasTask('extract')); $this->assertTrue($this->Shell->hasTask('Extract')); $this->assertFalse($this->Shell->hasTask('random')); - + $this->assertTrue($this->Shell->hasTask('db_config')); $this->assertTrue($this->Shell->hasTask('DbConfig')); } @@ -749,7 +749,7 @@ class ShellTest extends CakeTestCase { ->with(array('--help')) ->will($this->returnValue(array(array('help' => true), array()))); $Parser->expects($this->once())->method('help'); - + $Shell = $this->getMock('Shell', array('getOptionParser', 'out', 'startup', '_welcome'), array(), '', false); $Shell->expects($this->once())->method('getOptionParser') ->will($this->returnValue($Parser)); diff --git a/lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php index 4c19f6440..0d55bac6c 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php @@ -70,7 +70,7 @@ class ExtractTaskTest extends CakeTestCase { public function testExecute() { $this->Task->interactive = false; - $this->Task->params['paths'] = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Pages'; + $this->Task->params['paths'] = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Pages'; $this->Task->params['output'] = $this->path . DS; $this->Task->expects($this->never())->method('err'); $this->Task->expects($this->any())->method('in') @@ -117,7 +117,7 @@ class ExtractTaskTest extends CakeTestCase { $pattern = '/To change its layout, create: APP\/views\/layouts\/default\.ctp\./s'; $this->assertPattern($pattern, $result); - + // extract.ctp $pattern = '/\#: (\\\\|\/)extract\.ctp:6\n'; $pattern .= 'msgid "You have %d new message."\nmsgid_plural "You have %d new messages."/'; @@ -131,7 +131,7 @@ class ExtractTaskTest extends CakeTestCase { $pattern .= '\#: (\\\\|\/)home\.ctp:99\n'; $pattern .= 'msgid "Editing this Page"\nmsgstr ""/'; $this->assertPattern($pattern, $result); - + $pattern = '/\#: (\\\\|\/)extract\.ctp:17\nmsgid "'; $pattern .= 'Hot features!'; $pattern .= '\\\n - No Configuration: Set-up the database and let the magic begin'; @@ -162,7 +162,7 @@ class ExtractTaskTest extends CakeTestCase { function testExtractWithExclude() { $this->Task->interactive = false; - $this->Task->params['paths'] = LIBS . 'Test' . DS . 'test_app' . DS . 'View'; + $this->Task->params['paths'] = CAKE . 'Test' . DS . 'test_app' . DS . 'View'; $this->Task->params['output'] = $this->path . DS; $this->Task->params['exclude'] = 'Pages,Layouts'; @@ -175,7 +175,7 @@ class ExtractTaskTest extends CakeTestCase { $pattern = '/\#: .*extract\.ctp:6\n/'; $this->assertNotRegExp($pattern, $result); - + $pattern = '/\#: .*default\.ctp:26\n/'; $this->assertNotRegExp($pattern, $result); } @@ -188,10 +188,10 @@ class ExtractTaskTest extends CakeTestCase { function testExtractMultiplePaths() { $this->Task->interactive = false; - $this->Task->params['paths'] = - LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Pages,' . - LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Posts'; - + $this->Task->params['paths'] = + CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Pages,' . + CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Posts'; + $this->Task->params['output'] = $this->path . DS; $this->Task->expects($this->never())->method('err'); $this->Task->expects($this->never())->method('_stop'); diff --git a/lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php index b4eb78dbd..f6017c446 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php @@ -43,8 +43,8 @@ class ProjectTaskTest extends CakeTestCase { parent::setUp(); $out = $this->getMock('ConsoleOutput', array(), array(), '', false); $in = $this->getMock('ConsoleInput', array(), array(), '', false); - - $this->Task = $this->getMock('ProjectTask', + + $this->Task = $this->getMock('ProjectTask', array('in', 'err', 'createFile', '_stop'), array($out, $out, $in) ); @@ -70,7 +70,7 @@ class ProjectTaskTest extends CakeTestCase { * @return void */ protected function _setupTestProject() { - $skel = LIBS . 'Console' . DS . 'templates' . DS . 'skel'; + $skel = CAKE . 'Console' . DS . 'templates' . DS . 'skel'; $this->Task->expects($this->at(0))->method('in')->will($this->returnValue('y')); $this->Task->bake($this->Task->path . 'bake_test_app', $skel); } @@ -91,12 +91,12 @@ class ProjectTaskTest extends CakeTestCase { 'Console', 'Console' . DS . 'Command', 'Console' . DS . 'Command' . DS . 'Task', - 'Controller', - 'Model', + 'Controller', + 'Model', 'View', 'View' . DS . 'Helper', 'Test', - 'Test' . DS . 'Case', + 'Test' . DS . 'Case', 'Test' . DS . 'Case' . DS . 'Model', 'Test' . DS . 'Fixture', 'tmp', @@ -118,21 +118,21 @@ class ProjectTaskTest extends CakeTestCase { $this->Task->params['empty'] = true; $this->_setupTestProject(); $path = $this->Task->path . 'bake_test_app'; - + $empty = array( 'Console' . DS . 'Command' . DS . 'Task', - 'Controller' . DS . 'Component', - 'Model' . DS . 'Behavior', + 'Controller' . DS . 'Component', + 'Model' . DS . 'Behavior', 'View' . DS . 'Helper', 'View' . DS . 'Errors', 'View' . DS . 'Scaffolds', - 'Test' . DS . 'Case' . DS . 'Model', + 'Test' . DS . 'Case' . DS . 'Model', 'Test' . DS . 'Case' . DS . 'Controller', 'Test' . DS . 'Case' . DS . 'View' . DS . 'Helper', 'Test' . DS . 'Fixture', 'webroot' . DS . 'js' ); - + foreach ($empty as $dir) { $this->assertTrue(is_file($path . DS . $dir . DS . 'empty'), 'Missing empty file in ' . $dir); } @@ -255,7 +255,7 @@ class ProjectTaskTest extends CakeTestCase { * @return void */ public function testExecute() { - $this->Task->params['skel'] = LIBS . 'Console' . DS. 'templates' . DS . 'skel'; + $this->Task->params['skel'] = CAKE . 'Console' . DS. 'templates' . DS . 'skel'; $this->Task->params['working'] = TMP . 'tests' . DS; $path = $this->Task->path . 'bake_test_app'; @@ -281,7 +281,7 @@ class ProjectTaskTest extends CakeTestCase { */ function testConsolePath() { $this->_setupTestProject(); - + $path = $this->Task->path . 'bake_test_app' . DS; $result = $this->Task->consolePath($path); $this->assertTrue($result); diff --git a/lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php index 7c1abbc00..e214b41a1 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php @@ -87,7 +87,7 @@ class TemplateTaskTest extends CakeTestCase { * @return void */ public function testFindingInstalledThemesForBake() { - $consoleLibs = LIBS . 'Console' . DS; + $consoleLibs = CAKE . 'Console' . DS; $this->Task->initialize(); $this->assertEqual($this->Task->templatePaths['default'], $consoleLibs . 'templates' . DS . 'default' . DS); } @@ -99,7 +99,7 @@ class TemplateTaskTest extends CakeTestCase { * @return void */ public function testGetThemePath() { - $defaultTheme = LIBS . 'Console' . DS . 'templates' . DS . 'default' .DS; + $defaultTheme = CAKE . 'Console' . DS . 'templates' . DS . 'default' .DS; $this->Task->templatePaths = array('default' => $defaultTheme); $this->Task->expects($this->exactly(1))->method('in')->will($this->returnValue('1')); @@ -126,7 +126,7 @@ class TemplateTaskTest extends CakeTestCase { public function testGenerate() { App::build(array( 'Console' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'Console' . DS + CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS ) )); $this->Task->initialize(); @@ -146,7 +146,7 @@ class TemplateTaskTest extends CakeTestCase { public function testGenerateWithTemplateFallbacks() { App::build(array( 'Console' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'Console' . DS, + CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS, CAKE_CORE_INCLUDE_PATH . DS . 'console' . DS ) )); diff --git a/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php index fd811d67a..534d898ee 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php @@ -242,7 +242,7 @@ class TestTaskTest extends CakeTestCase { $out = $this->getMock('ConsoleOutput', array(), array(), '', false); $in = $this->getMock('ConsoleInput', array(), array(), '', false); - $this->Task = $this->getMock('TestTask', + $this->Task = $this->getMock('TestTask', array('in', 'err', 'createFile', '_stop', 'isLoadableClass'), array($out, $out, $in) ); @@ -542,7 +542,7 @@ class TestTaskTest extends CakeTestCase { * @return void */ function testInteractiveWithPlugin() { - $testApp = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS; + $testApp = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS; App::build(array( 'plugins' => array($testApp) ), true); @@ -555,8 +555,8 @@ class TestTaskTest extends CakeTestCase { ->will($this->onConsecutiveCalls( 5, //helper 1 //OtherHelper - )); - + )); + $this->Task->expects($this->once()) ->method('createFile') ->with($path, $this->anything()); @@ -564,7 +564,7 @@ class TestTaskTest extends CakeTestCase { $this->Task->stdout->expects($this->at(21)) ->method('write') ->with('1. OtherHelperHelper'); - + $this->Task->execute(); } diff --git a/lib/Cake/Test/Case/Console/ShellDispatcherTest.php b/lib/Cake/Test/Case/Console/ShellDispatcherTest.php index 08ca66ea6..c5bb2a319 100644 --- a/lib/Cake/Test/Case/Console/ShellDispatcherTest.php +++ b/lib/Cake/Test/Case/Console/ShellDispatcherTest.php @@ -117,10 +117,10 @@ class ShellDispatcherTest extends CakeTestCase { parent::setUp(); App::build(array( 'plugins' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS + CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS ), 'Console/Command' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS + CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS ) ), true); CakePlugin::loadAll(); diff --git a/lib/Cake/Test/Case/Console/TaskCollectionTest.php b/lib/Cake/Test/Case/Console/TaskCollectionTest.php index 0b11ce39a..53b12b16c 100644 --- a/lib/Cake/Test/Case/Console/TaskCollectionTest.php +++ b/lib/Cake/Test/Case/Console/TaskCollectionTest.php @@ -119,4 +119,4 @@ class TaskCollectionTest extends CakeTestCase { $this->assertEquals(array('Extract'), $result, 'loaded tasks is wrong'); } -} \ No newline at end of file +} diff --git a/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php b/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php index 597ddce5d..43098a3f4 100644 --- a/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php @@ -16,7 +16,7 @@ * @since CakePHP(tm) v 1.2.0.5435 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ - + App::uses('AclComponent', 'Controller/Component'); App::uses('AclNode', 'Model'); class_exists('AclComponent'); @@ -210,7 +210,7 @@ class AclComponentTest extends CakeTestCase { } /** - * test that construtor throws an exception when Acl.classname is a + * test that construtor throws an exception when Acl.classname is a * non-existant class * * @expectedException CakeException @@ -262,7 +262,7 @@ class IniAclTest extends CakeTestCase { * @return void */ function testCheck() { - $iniFile = LIBS . 'Test' . DS . 'test_app' . DS . 'Config'. DS . 'acl.ini.php'; + $iniFile = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS . 'acl.ini.php'; $Ini = new IniAcl(); $Ini->config = $Ini->readConfigFile($iniFile); @@ -285,7 +285,7 @@ class IniAclTest extends CakeTestCase { * @return void */ function testCheckArray() { - $iniFile = LIBS . 'Test' . DS . 'test_app' . DS . 'Config'. DS . 'acl.ini.php'; + $iniFile = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS . 'acl.ini.php'; $Ini = new IniAcl(); $Ini->config = $Ini->readConfigFile($iniFile); diff --git a/lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticate.php b/lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticate.php index 70397d997..0af5d0193 100644 --- a/lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticate.php +++ b/lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticate.php @@ -155,7 +155,7 @@ class FormAuthenticateTest extends CakeTestCase { function testPluginModel() { Cache::delete('object_map', '_cake_core_'); App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), ), true); CakePlugin::load('TestPlugin'); @@ -164,10 +164,10 @@ class FormAuthenticateTest extends CakeTestCase { $user['username'] = 'gwoo'; $user['password'] = Security::hash(Configure::read('Security.salt') . 'cake'); $PluginModel->save($user, false); - + $this->auth->settings['userModel'] = 'TestPlugin.TestPluginAuthUser'; $this->auth->settings['fields']['username'] = 'username'; - + $request = new CakeRequest('posts/index', false); $request->data = array('TestPluginAuthUser' => array( 'username' => 'gwoo', @@ -185,4 +185,4 @@ class FormAuthenticateTest extends CakeTestCase { CakePlugin::unload(); } -} \ No newline at end of file +} diff --git a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php index ea54ff89f..01079fbec 100644 --- a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php @@ -887,7 +887,7 @@ class AuthTest extends CakeTestCase { function testNoRedirectOnLoginAction() { $controller = $this->getMock('Controller'); $controller->methods = array('login'); - + $url = '/AuthTest/login'; $this->Auth->request = $controller->request = new CakeRequest($url); $this->Auth->request->addParams(Router::parse($url)); @@ -951,7 +951,7 @@ class AuthTest extends CakeTestCase { */ function testAjaxLogin() { App::build(array( - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) )); $_SERVER['HTTP_X_REQUESTED_WITH'] = "XMLHttpRequest"; @@ -1127,7 +1127,7 @@ class AuthTest extends CakeTestCase { $this->Auth->Session->expects($this->once()) ->method('setFlash') ->with('Auth failure', 'custom', array(1), 'auth-key'); - + $this->Auth->flash = array( 'element' => 'custom', 'params' => array(1), @@ -1187,6 +1187,6 @@ class AuthTest extends CakeTestCase { $result = $this->Auth->password('password'); $expected = Security::hash('password', null, true); $this->assertEquals($expected, $result); - + } } diff --git a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php index 82e9e80c4..24711f0cb 100644 --- a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php @@ -157,7 +157,7 @@ class EmailComponentTest extends CakeTestCase { $this->Controller->EmailTest->initialize($this->Controller, array()); App::build(array( - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) )); } @@ -432,7 +432,7 @@ HTMLBLOC; */ function testMessageRetrievalWithoutTemplate() { App::build(array( - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) )); $this->Controller->EmailTest->to = 'postmaster@example.com'; @@ -470,7 +470,7 @@ HTMLBLOC; */ function testMessageRetrievalWithTemplate() { App::build(array( - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) )); $this->Controller->set('value', 22091985); @@ -799,8 +799,8 @@ HTMLBLOC; function testPluginCustomViewClass() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) )); $this->Controller->view = 'TestPlugin.Email'; diff --git a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php index fea7d6813..31d81ff48 100644 --- a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php @@ -373,7 +373,7 @@ class RequestHandlerComponentTest extends CakeTestCase { $this->RequestHandler->request->expects($this->any()) ->method('accepts') ->will($this->returnValue(array('application/xml'))); - + $this->RequestHandler->response = $this->getMock('CakeResponse', array('type', 'download', 'charset')); $this->RequestHandler->response->expects($this->at(0)) ->method('type') @@ -384,7 +384,7 @@ class RequestHandlerComponentTest extends CakeTestCase { $this->RequestHandler->response->expects($this->at(2)) ->method('download') ->with('myfile.xml'); - + $this->RequestHandler->renderAs($this->Controller, 'xml', array('attachment' => 'myfile.xml')); $expected = 'RequestHandlerTest' . DS . 'xml'; @@ -417,17 +417,17 @@ class RequestHandlerComponentTest extends CakeTestCase { */ function testRespondAsWithAttachment() { $this->RequestHandler = $this->getMock( - 'RequestHandlerComponent', - array('_header'), + 'RequestHandlerComponent', + array('_header'), array(&$this->Controller->Components) ); $this->RequestHandler->response = $this->getMock('CakeResponse', array('type', 'download')); $this->RequestHandler->request = $this->getMock('CakeRequest'); - + $this->RequestHandler->request->expects($this->once()) ->method('accepts') ->will($this->returnValue(array('application/xml'))); - + $this->RequestHandler->response->expects($this->once())->method('download') ->with('myfile.xml'); $this->RequestHandler->response->expects($this->once())->method('type') @@ -547,7 +547,7 @@ class RequestHandlerComponentTest extends CakeTestCase { $request->expects($this->once())->method('is') ->with('mobile') ->will($this->returnValue(true)); - + $this->RequestHandler->request = $request; $this->assertTrue($this->RequestHandler->isMobile()); } @@ -563,7 +563,7 @@ class RequestHandlerComponentTest extends CakeTestCase { $request->expects($this->once())->method('is') ->with('ssl') ->will($this->returnValue(true)); - + $this->RequestHandler->request = $request; $this->assertTrue($this->RequestHandler->isSsl()); } @@ -583,15 +583,15 @@ class RequestHandlerComponentTest extends CakeTestCase { $request->expects($this->at(1))->method('is') ->with('post') ->will($this->returnValue(false)); - + $request->expects($this->at(2))->method('is') ->with('delete') ->will($this->returnValue(true)); - + $request->expects($this->at(3))->method('is') ->with('put') ->will($this->returnValue(false)); - + $this->RequestHandler->request = $request; $this->assertTrue($this->RequestHandler->isGet()); $this->assertFalse($this->RequestHandler->isPost()); @@ -613,7 +613,7 @@ class RequestHandlerComponentTest extends CakeTestCase { $result = $this->RequestHandler->mapAlias('wap'); $this->assertEquals('text/vnd.wap.wml', $result); - + $result = $this->RequestHandler->mapAlias(array('xml', 'js', 'json')); $expected = array('application/xml', 'text/javascript', 'application/json'); $this->assertEquals($expected, $result); @@ -695,7 +695,7 @@ class RequestHandlerComponentTest extends CakeTestCase { */ function testAjaxRedirectAsRequestAction() { App::build(array( - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) ), true); $this->Controller->RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components)); @@ -724,7 +724,7 @@ class RequestHandlerComponentTest extends CakeTestCase { */ function testAjaxRedirectAsRequestActionStillRenderingLayout() { App::build(array( - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) ), true); $this->Controller->RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components)); diff --git a/lib/Cake/Test/Case/Controller/ComponentCollectionTest.php b/lib/Cake/Test/Case/Controller/ComponentCollectionTest.php index f21fc7d1f..03e49179d 100644 --- a/lib/Cake/Test/Case/Controller/ComponentCollectionTest.php +++ b/lib/Cake/Test/Case/Controller/ComponentCollectionTest.php @@ -84,7 +84,7 @@ class ComponentCollectionTest extends CakeTestCase { $result = $this->Components->load('Cookie'); $this->assertInstanceOf('CookieAliasComponent', $result); - App::build(array('plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS))); + App::build(array('plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS))); CakePlugin::load('TestPlugin'); $result = $this->Components->load('SomeOther', array('className' => 'TestPlugin.OtherComponent')); $this->assertInstanceOf('OtherComponentComponent', $result); @@ -125,7 +125,7 @@ class ComponentCollectionTest extends CakeTestCase { */ function testLoadPluginComponent() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), )); CakePlugin::load('TestPlugin'); $result = $this->Components->load('TestPlugin.OtherComponent'); @@ -171,4 +171,4 @@ class ComponentCollectionTest extends CakeTestCase { $this->assertSame($controller, $result); } -} \ No newline at end of file +} diff --git a/lib/Cake/Test/Case/Controller/ComponentTest.php b/lib/Cake/Test/Case/Controller/ComponentTest.php index a93e231e2..b9cc715c5 100644 --- a/lib/Cake/Test/Case/Controller/ComponentTest.php +++ b/lib/Cake/Test/Case/Controller/ComponentTest.php @@ -251,7 +251,7 @@ class ComponentTest extends CakeTestCase { function setUp() { $this->_pluginPaths = App::path('plugins'); App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) )); } @@ -316,10 +316,10 @@ class ComponentTest extends CakeTestCase { $Collection = new ComponentCollection(); $Banana = $Collection->load('Banana'); $Orange = $Collection->load('Orange'); - + $this->assertSame($Banana, $Orange->Banana, 'Should be references'); $Banana->testField = 'OrangeField'; - + $this->assertSame($Banana->testField, $Orange->Banana->testField, 'References are broken'); } diff --git a/lib/Cake/Test/Case/Controller/ControllerTest.php b/lib/Cake/Test/Case/Controller/ControllerTest.php index 75ebf7625..97f0b5ccb 100644 --- a/lib/Cake/Test/Case/Controller/ControllerTest.php +++ b/lib/Cake/Test/Case/Controller/ControllerTest.php @@ -439,9 +439,9 @@ class ControllerTest extends CakeTestCase { */ function testLoadModelInPlugins() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), - 'Controller' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Controller' . DS), - 'Model' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), + 'Controller' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS), + 'Model' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS) )); CakePlugin::load('TestPlugin'); App::uses('TestPluginAppController', 'TestPlugin.Controller'); @@ -482,7 +482,7 @@ class ControllerTest extends CakeTestCase { unset($Controller); - App::build(array('plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS))); + App::build(array('plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS))); CakePlugin::load('TestPlugin'); $Controller = new Controller($request); @@ -572,7 +572,7 @@ class ControllerTest extends CakeTestCase { $this->assertEqual($result, $expected); App::build(array( - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) )); $Controller = new Controller($request); $Controller->response = $this->getMock('CakeResponse', array('_sendHeader')); @@ -634,7 +634,7 @@ class ControllerTest extends CakeTestCase { */ function testRender() { App::build(array( - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) ), true); $request = new CakeRequest('controller_posts/index'); $request->params['action'] = 'index'; @@ -680,7 +680,7 @@ class ControllerTest extends CakeTestCase { function testComponentBeforeRenderChangingViewClass() { App::build(array( 'View' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS + CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS ) ), true); $Controller = new Controller($this->getMock('CakeRequest')); diff --git a/lib/Cake/Test/Case/Controller/PagesControllerTest.php b/lib/Cake/Test/Case/Controller/PagesControllerTest.php index cebf1c365..ffcd0668a 100644 --- a/lib/Cake/Test/Case/Controller/PagesControllerTest.php +++ b/lib/Cake/Test/Case/Controller/PagesControllerTest.php @@ -45,7 +45,7 @@ class PagesControllerTest extends CakeTestCase { function testDisplay() { App::build(array( 'View' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS + CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS ) )); $Pages = new PagesController(new CakeRequest(null, false)); diff --git a/lib/Cake/Test/Case/Controller/ScaffoldTest.php b/lib/Cake/Test/Case/Controller/ScaffoldTest.php index b0eec3a18..c377ba9c0 100644 --- a/lib/Cake/Test/Case/Controller/ScaffoldTest.php +++ b/lib/Cake/Test/Case/Controller/ScaffoldTest.php @@ -279,8 +279,8 @@ class ScaffoldViewTest extends CakeTestCase { $this->Controller->response = $this->getMock('CakeResponse', array('_sendHeader')); App::build(array( - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS), - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) )); } @@ -307,39 +307,39 @@ class ScaffoldViewTest extends CakeTestCase { $this->Controller->request->params['action'] = 'index'; $ScaffoldView = new TestScaffoldView($this->Controller); $result = $ScaffoldView->testGetFilename('index'); - $expected = LIBS . 'View' . DS . 'scaffolds' . DS . 'index.ctp'; + $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'index.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('edit'); - $expected = LIBS . 'View' . DS . 'scaffolds' . DS . 'form.ctp'; + $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'form.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('add'); - $expected = LIBS . 'View' . DS . 'scaffolds' . DS . 'form.ctp'; + $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'form.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('view'); - $expected = LIBS . 'View' . DS . 'scaffolds' . DS . 'view.ctp'; + $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'view.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('admin_index'); - $expected = LIBS . 'View' . DS . 'scaffolds' . DS . 'index.ctp'; + $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'index.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('admin_view'); - $expected = LIBS . 'View' . DS . 'scaffolds' . DS . 'view.ctp'; + $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'view.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('admin_edit'); - $expected =LIBS . 'View' . DS . 'scaffolds' . DS . 'form.ctp'; + $expected =CAKE . 'View' . DS . 'scaffolds' . DS . 'form.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('admin_add'); - $expected = LIBS . 'View' . DS . 'scaffolds' . DS . 'form.ctp'; + $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'form.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('error'); - $expected = LIBS . 'View' . DS . 'errors' . DS . 'scaffold_error.ctp'; + $expected = CAKE . 'View' . DS . 'errors' . DS . 'scaffold_error.ctp'; $this->assertEqual($result, $expected); $Controller = new ScaffoldMockController($this->request); @@ -349,11 +349,11 @@ class ScaffoldViewTest extends CakeTestCase { $ScaffoldView = new TestScaffoldView($Controller); $result = $ScaffoldView->testGetFilename('admin_edit'); - $expected = LIBS . 'Test' . DS . 'test_app' .DS . 'View' . DS . 'Posts' . DS . 'scaffold.form.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' .DS . 'View' . DS . 'Posts' . DS . 'scaffold.form.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('edit'); - $expected = LIBS . 'Test' . DS . 'test_app' .DS . 'View' . DS . 'Posts' . DS . 'scaffold.form.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' .DS . 'View' . DS . 'Posts' . DS . 'scaffold.form.ctp'; $this->assertEqual($result, $expected); $Controller = new ScaffoldMockController($this->request); @@ -368,12 +368,12 @@ class ScaffoldViewTest extends CakeTestCase { $ScaffoldView = new TestScaffoldView($Controller); $result = $ScaffoldView->testGetFilename('admin_add'); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS .'test_plugin' . DS . 'View' . DS . 'tests' . DS . 'scaffold.form.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('add'); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS .'test_plugin' . DS . 'View' . DS . 'tests' . DS . 'scaffold.form.ctp'; $this->assertEqual($result, $expected); @@ -392,7 +392,7 @@ class ScaffoldViewTest extends CakeTestCase { $ScaffoldView = new TestScaffoldView($this->Controller); $result = $ScaffoldView->testGetFilename('index'); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'themed' . DS . 'test_theme' . DS . 'posts' . DS . 'scaffold.index.ctp'; $this->assertEqual($result, $expected); } @@ -456,7 +456,7 @@ class ScaffoldViewTest extends CakeTestCase { 'action' => 'view', ); $this->Controller->request->addParams($params); - + //set router. Router::reload(); Router::setRequestInfo($this->Controller->request); diff --git a/lib/Cake/Test/Case/Core/AppTest.php b/lib/Cake/Test/Case/Core/AppTest.php index 6edd0758d..1ca7c6324 100644 --- a/lib/Cake/Test/Case/Core/AppTest.php +++ b/lib/Cake/Test/Case/Core/AppTest.php @@ -221,22 +221,22 @@ class AppImportTest extends CakeTestCase { */ function testCore() { $model = App::core('Model'); - $this->assertEqual(array(LIBS . 'Model' . DS), $model); + $this->assertEqual(array(CAKE . 'Model' . DS), $model); $view = App::core('View'); - $this->assertEqual(array(LIBS . 'View' . DS), $view); + $this->assertEqual(array(CAKE . 'View' . DS), $view); $controller = App::core('Controller'); - $this->assertEqual(array(LIBS . 'Controller' . DS), $controller); + $this->assertEqual(array(CAKE . 'Controller' . DS), $controller); $component = App::core('Controller/Component'); - $this->assertEqual(array(LIBS . 'Controller' . DS . 'Component' . DS), str_replace('/', DS, $component)); + $this->assertEqual(array(CAKE . 'Controller' . DS . 'Component' . DS), str_replace('/', DS, $component)); $auth = App::core('Controller/Component/Auth'); - $this->assertEqual(array(LIBS . 'Controller' . DS . 'Component' . DS . 'Auth' . DS), str_replace('/', DS, $auth)); + $this->assertEqual(array(CAKE . 'Controller' . DS . 'Component' . DS . 'Auth' . DS), str_replace('/', DS, $auth)); $datasource = App::core('Model/Datasource'); - $this->assertEqual(array(LIBS . 'Model' . DS . 'Datasource' . DS), str_replace('/', DS, $datasource)); + $this->assertEqual(array(CAKE . 'Model' . DS . 'Datasource' . DS), str_replace('/', DS, $datasource)); } /** @@ -246,7 +246,7 @@ class AppImportTest extends CakeTestCase { * @return void */ function testListObjects() { - $result = App::objects('class', LIBS . 'Routing', false); + $result = App::objects('class', CAKE . 'Routing', false); $this->assertTrue(in_array('Dispatcher', $result)); $this->assertTrue(in_array('Router', $result)); @@ -300,7 +300,7 @@ class AppImportTest extends CakeTestCase { App::build(array( 'plugins' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'Lib' . DS + CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS ) )); $result = App::objects('plugin', null, false); @@ -317,8 +317,8 @@ class AppImportTest extends CakeTestCase { */ function testListObjectsInPlugin() { App::build(array( - 'Model' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS), - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'Model' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) )); CakePlugin::loadAll(); @@ -369,16 +369,16 @@ class AppImportTest extends CakeTestCase { */ function testPluginPath() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) )); CakePlugin::loadAll(); $path = App::pluginPath('TestPlugin'); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS; $this->assertEqual($path, $expected); $path = App::pluginPath('TestPluginTwo'); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPluginTwo' . DS; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPluginTwo' . DS; $this->assertEqual($path, $expected); App::build(); } @@ -390,14 +390,14 @@ class AppImportTest extends CakeTestCase { */ function testThemePath() { App::build(array( - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS) + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS) )); $path = App::themePath('test_theme'); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS; $this->assertEqual($path, $expected); $path = App::themePath('TestTheme'); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS; $this->assertEqual($path, $expected); App::build(); @@ -490,8 +490,8 @@ class AppImportTest extends CakeTestCase { */ function testPluginImporting() { App::build(array( - 'libs' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Lib' . DS), - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) )); CakePlugin::loadAll(); @@ -534,7 +534,7 @@ class AppImportTest extends CakeTestCase { $this->assertFalse(class_exists('BananaHelper', false), 'BananaHelper exists, cannot test importing it.'); App::build(array( 'View/Helper' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Helper' . DS + CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Helper' . DS ) )); $this->assertFalse(class_exists('BananaHelper', false), 'BananaHelper exists, cannot test importing it.'); @@ -551,10 +551,10 @@ class AppImportTest extends CakeTestCase { * @return void */ function testFileLoading () { - $file = App::import('File', 'RealFile', false, array(), LIBS . 'Config' . DS . 'config.php'); + $file = App::import('File', 'RealFile', false, array(), CAKE . 'Config' . DS . 'config.php'); $this->assertTrue($file); - $file = App::import('File', 'NoFile', false, array(), LIBS . 'Config' . DS . 'cake' . DS . 'config.php'); + $file = App::import('File', 'NoFile', false, array(), CAKE . 'Config' . DS . 'cake' . DS . 'config.php'); $this->assertFalse($file); } @@ -566,12 +566,12 @@ class AppImportTest extends CakeTestCase { */ function testFileLoadingWithArray() { $type = array('type' => 'File', 'name' => 'SomeName', 'parent' => false, - 'file' => LIBS . DS . 'Config' . DS . 'config.php'); + 'file' => CAKE . DS . 'Config' . DS . 'config.php'); $file = App::import($type); $this->assertTrue($file); $type = array('type' => 'File', 'name' => 'NoFile', 'parent' => false, - 'file' => LIBS . 'Config' . DS . 'cake' . DS . 'config.php'); + 'file' => CAKE . 'Config' . DS . 'cake' . DS . 'config.php'); $file = App::import($type); $this->assertFalse($file); } @@ -583,13 +583,13 @@ class AppImportTest extends CakeTestCase { * @return void */ function testFileLoadingReturnValue () { - $file = App::import('File', 'Name', false, array(), LIBS . 'Config' . DS . 'config.php', true); + $file = App::import('File', 'Name', false, array(), CAKE . 'Config' . DS . 'config.php', true); $this->assertTrue(!empty($file)); $this->assertTrue(isset($file['Cake.version'])); $type = array('type' => 'File', 'name' => 'OtherName', 'parent' => false, - 'file' => LIBS . 'Config' . DS . 'config.php', 'return' => true); + 'file' => CAKE . 'Config' . DS . 'config.php', 'return' => true); $file = App::import($type); $this->assertTrue(!empty($file)); @@ -603,10 +603,10 @@ class AppImportTest extends CakeTestCase { * @return void */ function testLoadingWithSearch () { - $file = App::import('File', 'NewName', false, array(LIBS . 'Config' . DS), 'config.php'); + $file = App::import('File', 'NewName', false, array(CAKE . 'Config' . DS), 'config.php'); $this->assertTrue($file); - $file = App::import('File', 'AnotherNewName', false, array(LIBS), 'config.php'); + $file = App::import('File', 'AnotherNewName', false, array(CAKE), 'config.php'); $this->assertFalse($file); } @@ -622,7 +622,7 @@ class AppImportTest extends CakeTestCase { 'name' => 'RandomName', 'parent' => false, 'file' => 'config.php', - 'search' => array(LIBS . 'Config' . DS) + 'search' => array(CAKE . 'Config' . DS) ); $file = App::import($type); $this->assertTrue($file); @@ -632,7 +632,7 @@ class AppImportTest extends CakeTestCase { 'name' => 'AnotherRandomName', 'parent' => false, 'file' => 'config.php', - 'search' => array(LIBS) + 'search' => array(CAKE) ); $file = App::import($type); $this->assertFalse($file); @@ -649,7 +649,7 @@ class AppImportTest extends CakeTestCase { $this->markTestSkipped('Cannot test loading of classes that exist.'); } App::build(array( - 'Model' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS) + 'Model' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS) )); $toLoad = array('PersisterOne', 'PersisterTwo'); $load = App::import('Model', $toLoad); @@ -668,8 +668,8 @@ class AppImportTest extends CakeTestCase { function testLoadingVendor() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), - 'vendors' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Vendor'. DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), + 'vendors' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor'. DS), ), App::RESET); CakePlugin::loadAll(); @@ -725,8 +725,8 @@ class AppImportTest extends CakeTestCase { */ public function testLoadClassInLibs() { App::build(array( - 'libs' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Lib' . DS), - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) ), App::RESET); CakePlugin::loadAll(); diff --git a/lib/Cake/Test/Case/Core/ConfigureTest.php b/lib/Cake/Test/Case/Core/ConfigureTest.php index f31a753ce..cb85fcd75 100644 --- a/lib/Cake/Test/Case/Core/ConfigureTest.php +++ b/lib/Cake/Test/Case/Core/ConfigureTest.php @@ -90,7 +90,7 @@ class ConfigureTest extends CakeTestCase { $result = Configure::read('debug'); $this->assertTrue($result >= 0); - + $result = Configure::read(); $this->assertTrue(is_array($result)); $this->assertTrue(isset($result['debug'])); @@ -198,7 +198,7 @@ class ConfigureTest extends CakeTestCase { * @return void */ function testLoadWithMerge() { - Configure::config('test', new PhpReader(LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS)); + Configure::config('test', new PhpReader(CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS)); $result = Configure::load('var_test', 'test'); $this->assertTrue($result); @@ -219,7 +219,7 @@ class ConfigureTest extends CakeTestCase { * @return void */ function testLoadNoMerge() { - Configure::config('test', new PhpReader(LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS)); + Configure::config('test', new PhpReader(CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS)); $result = Configure::load('var_test', 'test'); $this->assertTrue($result); @@ -241,7 +241,7 @@ class ConfigureTest extends CakeTestCase { * @return void */ function testLoadPlugin() { - App::build(array('plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)), true); + App::build(array('plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)), true); Configure::config('test', new PhpReader()); CakePlugin::load('TestPlugin'); $result = Configure::load('TestPlugin.load', 'test'); diff --git a/lib/Cake/Test/Case/Core/ObjectTest.php b/lib/Cake/Test/Case/Core/ObjectTest.php index 0f7f023de..ace5a1250 100644 --- a/lib/Cake/Test/Case/Core/ObjectTest.php +++ b/lib/Cake/Test/Case/Core/ObjectTest.php @@ -471,9 +471,9 @@ class ObjectTest extends CakeTestCase { Configure::write('Cache.disable', false); App::build(array( - 'models' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS), - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin'. DS), - 'behaviors' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model'. DS . 'Behavior' . DS), + 'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin'. DS), + 'behaviors' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model'. DS . 'Behavior' . DS), ), true); $this->assertFalse(class_exists('PersisterOneBehaviorBehavior')); @@ -532,8 +532,8 @@ class ObjectTest extends CakeTestCase { $this->assertFalse(class_exists('ContainableBehavior')); App::build(array( - 'models' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS), - 'behaviors' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model'. DS . 'Behavior' . DS), + 'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS), + 'behaviors' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model'. DS . 'Behavior' . DS), ), true); $this->assertFalse(class_exists('PersistOneBehaviorBehavior')); @@ -676,9 +676,9 @@ class ObjectTest extends CakeTestCase { */ function testRequestAction() { App::build(array( - 'models' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS), - 'views' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS), - 'controllers' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Controller' . DS) + 'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS), + 'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS), + 'controllers' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS) )); $result = $this->object->requestAction(''); $this->assertFalse($result); @@ -716,11 +716,11 @@ class ObjectTest extends CakeTestCase { */ function testRequestActionPlugins() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), )); CakePlugin::loadAll(); Router::reload(); - + $result = $this->object->requestAction('/test_plugin/tests/index', array('return')); $expected = 'test plugin index'; $this->assertEqual($result, $expected); @@ -744,7 +744,7 @@ class ObjectTest extends CakeTestCase { ); $expected = 25; $this->assertEqual($result, $expected); - + App::build(); CakePlugin::unload(); } @@ -756,10 +756,10 @@ class ObjectTest extends CakeTestCase { */ function testRequestActionArray() { App::build(array( - 'models' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS), - 'views' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS), - 'controllers' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Controller' . DS), - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin'. DS) + 'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS), + 'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS), + 'controllers' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin'. DS) )); CakePlugin::loadAll(); @@ -770,7 +770,7 @@ class ObjectTest extends CakeTestCase { $this->assertEqual($result, $expected); $result = $this->object->requestAction( - array('controller' => 'request_action', 'action' => 'another_ra_test'), + array('controller' => 'request_action', 'action' => 'another_ra_test'), array('pass' => array('5', '7')) ); $expected = 12; @@ -824,7 +824,7 @@ class ObjectTest extends CakeTestCase { $this->assertEqual($result['named'], $expected); $result = $this->object->requestAction( - array('controller' => 'request_action', 'action' => 'params_pass'), + array('controller' => 'request_action', 'action' => 'params_pass'), array('named' => array('sort' => 'desc', 'limit' => 5)) ); $this->assertEqual($result['named'], $expected); diff --git a/lib/Cake/Test/Case/Error/ErrorHandlerTest.php b/lib/Cake/Test/Case/Error/ErrorHandlerTest.php index a045f4ad5..2e4399f17 100644 --- a/lib/Cake/Test/Case/Error/ErrorHandlerTest.php +++ b/lib/Cake/Test/Case/Error/ErrorHandlerTest.php @@ -37,7 +37,7 @@ class ErrorHandlerTest extends CakeTestCase { function setUp() { App::build(array( 'View' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS + CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS ) ), true); Router::reload(); @@ -230,7 +230,7 @@ class ErrorHandlerTest extends CakeTestCase { function testLoadPluginHanlder() { App::build(array( 'plugins' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS + CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS ) ), true); CakePlugin::load('TestPlugin'); diff --git a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php index beca8eac2..ac4484b2b 100644 --- a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php +++ b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php @@ -158,7 +158,7 @@ class ExceptionRendererTest extends CakeTestCase { function setUp() { App::build(array( 'views' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS + CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS ) ), true); Router::reload(); @@ -203,7 +203,7 @@ class ExceptionRendererTest extends CakeTestCase { */ function testSubclassMethodsNotBeingConvertedToError() { Configure::write('debug', 2); - + $exception = new MissingWidgetThingException('Widget not found'); $ExceptionRenderer = $this->_mockResponse(new MyCustomExceptionRenderer($exception)); @@ -240,10 +240,10 @@ class ExceptionRendererTest extends CakeTestCase { */ function testSubclassConvertingFrameworkErrors() { Configure::write('debug', 0); - + $exception = new MissingControllerException('PostsController'); $ExceptionRenderer = $this->_mockResponse(new MyCustomExceptionRenderer($exception)); - + $this->assertEqual('error400', $ExceptionRenderer->method); ob_start(); diff --git a/lib/Cake/Test/Case/I18n/I18nTest.php b/lib/Cake/Test/Case/I18n/I18nTest.php index 5c4f87669..f5024fd62 100644 --- a/lib/Cake/Test/Case/I18n/I18nTest.php +++ b/lib/Cake/Test/Case/I18n/I18nTest.php @@ -34,8 +34,8 @@ class I18nTest extends CakeTestCase { function setUp() { Cache::delete('object_map', '_cake_core_'); App::build(array( - 'locales' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Locale' . DS), - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) ), true); CakePlugin::loadAll(); } @@ -89,7 +89,7 @@ class I18nTest extends CakeTestCase { $this->assertEqual($cachedDom2['LC_MESSAGES']['dom2.foo'], 'Dom 2 Foo'); $this->assertEqual($cachedDom2['LC_MESSAGES']['dom2.bar'], 'Dom 2 Bar'); - // modify cache entry manually to verify that dom1 entries now will be read from cache + // modify cache entry manually to verify that dom1 entries now will be read from cache $cachedDom1['LC_MESSAGES']['dom1.foo'] = 'FOO'; Cache::write('dom1_' . $lang, $cachedDom1, '_cake_core_'); $this->assertEqual(I18n::translate('dom1.foo', false, 'dom1'), 'FOO'); @@ -2432,7 +2432,7 @@ class I18nTest extends CakeTestCase { */ function testPluginTranslation() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) )); Configure::write('Config.language', 'po'); @@ -2649,9 +2649,9 @@ class I18nTest extends CakeTestCase { function testTimeDefinitionJapanese(){ Configure::write('Config.language', 'ja_jp'); $result = __c('d_fmt', 5); - + $expected = "%Yå¹´%m月%dæ—¥"; - + $this->assertEqual($result, $expected); $result = __c('am_pm', 5); diff --git a/lib/Cake/Test/Case/Log/CakeLogTest.php b/lib/Cake/Test/Case/Log/CakeLogTest.php index c910780f7..f20af3873 100644 --- a/lib/Cake/Test/Case/Log/CakeLogTest.php +++ b/lib/Cake/Test/Case/Log/CakeLogTest.php @@ -47,8 +47,8 @@ class CakeLogTest extends CakeTestCase { */ function testImportingLoggers() { App::build(array( - 'libs' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Lib' . DS), - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) ), true); CakePlugin::load('TestPlugin'); diff --git a/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php b/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php index 27508a12e..6e08327f6 100644 --- a/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php +++ b/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php @@ -345,11 +345,11 @@ class Test2Behavior extends TestBehavior { public $mapMethods = array('/mappingRobot(\w+)/' => 'mapped'); function resolveMethod($model, $stuff) { - + } - + function mapped($model, $method, $query) { - + } } @@ -453,7 +453,7 @@ class BehaviorCollectionTest extends CakeTestCase { $this->assertEquals($Apple->testMethod(true), 'working'); $this->assertEquals($Apple->Behaviors->dispatchMethod($Apple, 'testMethod'), 'working'); - App::build(array('plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS))); + App::build(array('plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS))); CakePlugin::load('TestPlugin'); $this->assertTrue($Apple->Behaviors->load('SomeOther', array('className' => 'TestPlugin.TestPluginPersisterOne'))); $this->assertInstanceOf('TestPluginPersisterOneBehavior', $Apple->Behaviors->SomeOther); @@ -1141,7 +1141,7 @@ class BehaviorCollectionTest extends CakeTestCase { $Sample = new Sample(); $Collection = new BehaviorCollection(); $Collection->init('Sample', array('Test', 'Test2')); - + $this->assertTrue($Collection->hasMethod('testMethod')); $this->assertTrue($Collection->hasMethod('resolveMethod')); diff --git a/lib/Cake/Test/Case/Model/CakeSchemaTest.php b/lib/Cake/Test/Case/Model/CakeSchemaTest.php index 2abe76e74..953fada0f 100644 --- a/lib/Cake/Test/Case/Model/CakeSchemaTest.php +++ b/lib/Cake/Test/Case/Model/CakeSchemaTest.php @@ -503,7 +503,7 @@ class CakeSchemaTest extends CakeTestCase { * @access public */ public $fixtures = array( - 'core.post', 'core.tag', 'core.posts_tag', 'core.test_plugin_comment', + 'core.post', 'core.tag', 'core.posts_tag', 'core.test_plugin_comment', 'core.datatype', 'core.auth_user', 'core.author', 'core.test_plugin_article', 'core.user', 'core.comment' ); @@ -665,7 +665,7 @@ class CakeSchemaTest extends CakeTestCase { function testSchemaReadWithPlugins() { App::objects('model', null, false); App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) )); CakePlugin::load('TestPlugin'); @@ -984,7 +984,7 @@ class CakeSchemaTest extends CakeTestCase { */ function testSchemaLoadingFromPlugin() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) )); CakePlugin::load('TestPlugin'); $Other = $this->Schema->load(array('name' => 'TestPluginApp', 'plugin' => 'TestPlugin')); diff --git a/lib/Cake/Test/Case/Model/ConnectionManagerTest.php b/lib/Cake/Test/Case/Model/ConnectionManagerTest.php index 2fdc1d0fe..6c56e6a8e 100644 --- a/lib/Cake/Test/Case/Model/ConnectionManagerTest.php +++ b/lib/Cake/Test/Case/Model/ConnectionManagerTest.php @@ -80,7 +80,7 @@ class ConnectionManagerTest extends CakeTestCase { */ function testGetPluginDataSource() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) )); CakePlugin::load('TestPlugin'); $name = 'test_source'; @@ -102,7 +102,7 @@ class ConnectionManagerTest extends CakeTestCase { */ function testGetPluginDataSourceAndPluginDriver() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) )); CakePlugin::load('TestPlugin'); $name = 'test_plugin_source_and_driver'; @@ -126,7 +126,7 @@ class ConnectionManagerTest extends CakeTestCase { */ function testGetLocalDataSourceAndPluginDriver() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) )); CakePlugin::load('TestPlugin'); $name = 'test_local_source_and_plugin_driver'; @@ -149,9 +149,9 @@ class ConnectionManagerTest extends CakeTestCase { */ function testGetPluginDataSourceAndLocalDriver() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), 'Model/Datasource/Database' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS . 'Database' . DS + CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS . 'Database' . DS ) )); @@ -272,9 +272,9 @@ class ConnectionManagerTest extends CakeTestCase { */ function testConnectionData() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), 'Model/Datasource' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS + CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS ) )); CakePlugin::loadAll(); @@ -328,7 +328,7 @@ class ConnectionManagerTest extends CakeTestCase { public function testDrop() { App::build(array( 'Model/Datasource' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS + CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS ) )); ConnectionManager::create('droppable', array('datasource' => 'Test2Source')); diff --git a/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php b/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php index dbd87e892..b0a9ff44f 100644 --- a/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php @@ -23,7 +23,7 @@ class TestCakeSession extends CakeSession { public static function setUserAgent($value) { self::$_userAgent = $value; } - + public static function setHost($host) { self::_setHost($host); } @@ -143,7 +143,7 @@ class CakeSessionTest extends CakeTestCase { * * @access public * @return void - */ + */ function testCakeSessionPathEmpty() { TestCakeSession::init(''); $this->assertEquals(TestCakeSession::$path, '/', 'Session path is empty, with "" as $base needs to be /'); @@ -302,7 +302,7 @@ class CakeSessionTest extends CakeTestCase { */ function testId() { TestCakeSession::destroy(); - + $result = TestCakeSession::id(); $expected = session_id(); $this->assertEquals($expected, $result); @@ -528,7 +528,7 @@ class CakeSessionTest extends CakeTestCase { function testUsingAppLibsHandler() { App::build(array( 'Model/Datasource/Session' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS . 'Session' . DS + CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS . 'Session' . DS ), 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) ), true); @@ -553,14 +553,14 @@ class CakeSessionTest extends CakeTestCase { App::build(array( 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) ), true); - + Configure::write('Session', array( 'defaults' => 'cake', 'handler' => array( 'engine' => 'TestPlugin.TestPluginSession' ) )); - + TestCakeSession::destroy(); $this->assertTrue(TestCakeSession::started()); @@ -611,7 +611,7 @@ class CakeSessionTest extends CakeTestCase { function testReadAndWriteWithCustomCacheConfig() { Configure::write('Session.defaults', 'cache'); Configure::write('Session.handler.config', 'session_test'); - + Cache::config('session_test', array( 'engine' => 'File', 'prefix' => 'session_test_', @@ -663,7 +663,7 @@ class CakeSessionTest extends CakeTestCase { TestCakeSession::destroy(); $this->assertNull(TestCakeSession::read('SessionTestCase')); - + Configure::write('Session', array( 'defaults' => 'php' )); diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/MssqlTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/MssqlTest.php index 4dd371ef3..77f4b9d0e 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/MssqlTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/MssqlTest.php @@ -17,10 +17,10 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once LIBS.'Model'.DS.'Model.php'; -require_once LIBS.'Model'.DS.'Datasource'.DS.'DataSource.php'; -require_once LIBS.'Model'.DS.'Datasource'.DS.'DboSource.php'; -require_once LIBS.'Model'.DS.'Datasource'.DS.'Database'.DS.'Mssql.php'; +require_once CAKE.'Model'.DS.'Model.php'; +require_once CAKE.'Model'.DS.'Datasource'.DS.'DataSource.php'; +require_once CAKE.'Model'.DS.'Datasource'.DS.'DboSource.php'; +require_once CAKE.'Model'.DS.'Datasource'.DS.'Database'.DS.'Mssql.php'; /** * DboMssqlTestDb class diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/OrcaleTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/OrcaleTest.php index 453fc7ea0..8e20cbcbc 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/OrcaleTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/OrcaleTest.php @@ -17,8 +17,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once LIBS . 'Model' . DS . 'Datasource' . DS . 'DboSource.php'; -require_once LIBS . 'Model' . DS . 'Datasource' . DS . 'Database' . DS . 'Oracle.php'; +require_once CAKE . 'Model' . DS . 'Datasource' . DS . 'DboSource.php'; +require_once CAKE . 'Model' . DS . 'Datasource' . DS . 'Database' . DS . 'Oracle.php'; /** * DboOracleTest class diff --git a/lib/Cake/Test/Case/Routing/DispatcherTest.php b/lib/Cake/Test/Case/Routing/DispatcherTest.php index e4da9ee47..2bd9f362a 100644 --- a/lib/Cake/Test/Case/Routing/DispatcherTest.php +++ b/lib/Cake/Test/Case/Routing/DispatcherTest.php @@ -20,7 +20,7 @@ App::uses('Dispatcher', 'Routing'); App::uses('CakeResponse', 'Network'); if (!class_exists('AppController', false)) { - require_once LIBS . 'Controller' . DS . 'AppController.php'; + require_once CAKE . 'Controller' . DS . 'AppController.php'; } elseif (!defined('APP_CONTROLLER_EXISTS')){ define('APP_CONTROLLER_EXISTS', true); } @@ -739,7 +739,7 @@ class DispatcherTest extends CakeTestCase { $this->assertEquals('Action SomePagesController::home() could not be found.', $e->getMessage()); } } - + /** * test that methods declared in Controller are treated as missing methods. * @@ -765,7 +765,7 @@ class DispatcherTest extends CakeTestCase { */ public function testDispatchBasic() { App::build(array( - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) )); $Dispatcher = new TestDispatcher(); Configure::write('App.baseUrl', '/index.php'); @@ -813,7 +813,7 @@ class DispatcherTest extends CakeTestCase { $url = new CakeRequest('test_dispatch_pages/camelCased'); $controller = $Dispatcher->dispatch($url, array('return' => 1)); $this->assertEqual('TestDispatchPages', $controller->name); - + $url = new CakeRequest('test_dispatch_pages/camelCased/something. .'); $controller = $Dispatcher->dispatch($url, array('return' => 1)); $this->assertEqual($controller->params['pass'][0], 'something. .', 'Period was chopped off. %s'); @@ -857,7 +857,7 @@ class DispatcherTest extends CakeTestCase { Router::reload(); $Dispatcher = new TestDispatcher(); Router::connect( - '/my_plugin/:controller/*', + '/my_plugin/:controller/*', array('plugin' => 'my_plugin', 'controller' => 'pages', 'action' => 'display') ); @@ -1042,7 +1042,7 @@ class DispatcherTest extends CakeTestCase { } Router::reload(); App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) ), true); CakePlugin::loadAll(); @@ -1087,7 +1087,7 @@ class DispatcherTest extends CakeTestCase { $Dispatcher->base = false; $url = new CakeRequest('my_plugin/not_here/param:value/param2:value2'); - + try { $controller = $Dispatcher->dispatch($url, array('return'=> 1)); $this->fail('No exception.'); @@ -1142,7 +1142,7 @@ class DispatcherTest extends CakeTestCase { public function testTestPluginDispatch() { $Dispatcher = new TestDispatcher(); App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) )); CakePlugin::loadAll(); Router::reload(); @@ -1170,7 +1170,7 @@ class DispatcherTest extends CakeTestCase { $_SERVER['PHP_SELF'] = '/cake/repo/branches/1.2.x.x/index.php'; $Dispatcher = new TestDispatcher(); $url = new CakeRequest('some_posts/index/param:value/param2:value2'); - + try { $controller = $Dispatcher->dispatch($url, array('return'=> 1)); $this->fail('No exception.'); @@ -1200,9 +1200,9 @@ class DispatcherTest extends CakeTestCase { Router::reload(); App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), - 'vendors' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Vendor'. DS), - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), + 'vendors' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor'. DS), + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) )); CakePlugin::loadAll(); @@ -1215,7 +1215,7 @@ class DispatcherTest extends CakeTestCase { } catch (MissingControllerException $e) { $this->assertEquals('Controller class ThemeController could not be found.', $e->getMessage()); } - + try { $Dispatcher->dispatch(new CakeRequest('theme/test_theme/pdfs')); $this->fail('No exception'); @@ -1227,21 +1227,21 @@ class DispatcherTest extends CakeTestCase { $Dispatcher->dispatch(new CakeRequest('theme/test_theme/flash/theme_test.swf')); $result = ob_get_clean(); - $file = file_get_contents(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'webroot' . DS . 'flash' . DS . 'theme_test.swf'); + $file = file_get_contents(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'webroot' . DS . 'flash' . DS . 'theme_test.swf'); $this->assertEqual($file, $result); $this->assertEqual('this is just a test to load swf file from the theme.', $result); ob_start(); $Dispatcher->dispatch(new CakeRequest('theme/test_theme/pdfs/theme_test.pdf')); $result = ob_get_clean(); - $file = file_get_contents(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'webroot' . DS . 'pdfs' . DS . 'theme_test.pdf'); + $file = file_get_contents(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'webroot' . DS . 'pdfs' . DS . 'theme_test.pdf'); $this->assertEqual($file, $result); $this->assertEqual('this is just a test to load pdf file from the theme.', $result); ob_start(); $Dispatcher->dispatch(new CakeRequest('theme/test_theme/img/test.jpg')); $result = ob_get_clean(); - $file = file_get_contents(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'webroot' . DS . 'img' . DS . 'test.jpg'); + $file = file_get_contents(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'webroot' . DS . 'img' . DS . 'test.jpg'); $this->assertEqual($file, $result); ob_start(); @@ -1262,20 +1262,20 @@ class DispatcherTest extends CakeTestCase { ob_start(); $Dispatcher->asset('test_plugin/root.js'); $result = ob_get_clean(); - $expected = file_get_contents(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'webroot' . DS . 'root.js'); + $expected = file_get_contents(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'webroot' . DS . 'root.js'); $this->assertEqual($result, $expected); ob_start(); $Dispatcher->dispatch(new CakeRequest('test_plugin/flash/plugin_test.swf')); $result = ob_get_clean(); - $file = file_get_contents(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'webroot' . DS . 'flash' . DS . 'plugin_test.swf'); + $file = file_get_contents(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'webroot' . DS . 'flash' . DS . 'plugin_test.swf'); $this->assertEqual($file, $result); $this->assertEqual('this is just a test to load swf file from the plugin.', $result); ob_start(); $Dispatcher->dispatch(new CakeRequest('test_plugin/pdfs/plugin_test.pdf')); $result = ob_get_clean(); - $file = file_get_contents(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'webroot' . DS . 'pdfs' . DS . 'plugin_test.pdf'); + $file = file_get_contents(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'webroot' . DS . 'pdfs' . DS . 'plugin_test.pdf'); $this->assertEqual($file, $result); $this->assertEqual('this is just a test to load pdf file from the plugin.', $result); @@ -1297,7 +1297,7 @@ class DispatcherTest extends CakeTestCase { ob_start(); $Dispatcher->asset('test_plugin/img/cake.icon.gif'); $result = ob_get_clean(); - $file = file_get_contents(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' .DS . 'webroot' . DS . 'img' . DS . 'cake.icon.gif'); + $file = file_get_contents(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' .DS . 'webroot' . DS . 'img' . DS . 'cake.icon.gif'); $this->assertEqual($file, $result); ob_start(); @@ -1321,7 +1321,7 @@ class DispatcherTest extends CakeTestCase { $Dispatcher->asset('test_plugin/css/theme_one.htc'); $result = ob_get_clean(); $this->assertEqual('htc file', $result); - + if (php_sapi_name() == 'cli') { while (ob_get_level()) { ob_get_clean(); @@ -1348,7 +1348,7 @@ class DispatcherTest extends CakeTestCase { } /** - * test that asset filters work for theme and plugin assets + * test that asset filters work for theme and plugin assets * * @return void */ @@ -1368,7 +1368,7 @@ class DispatcherTest extends CakeTestCase { $this->assertTrue($Dispatcher->asset('test_plugin/cjs/debug_kit.js')); $this->assertFalse($Dispatcher->asset('css/ccss/debug_kit.css')); - + $this->assertFalse($Dispatcher->asset('js/cjs/debug_kit.js')); } /** @@ -1388,7 +1388,7 @@ class DispatcherTest extends CakeTestCase { Router::connect('/', array('controller' => 'test_cached_pages', 'action' => 'index')); App::build(array( - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS), + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS), ), true); $dispatcher = new TestDispatcher(); diff --git a/lib/Cake/Test/Case/Routing/RouterTest.php b/lib/Cake/Test/Case/Routing/RouterTest.php index f53806894..a0af84d71 100644 --- a/lib/Cake/Test/Case/Routing/RouterTest.php +++ b/lib/Cake/Test/Case/Routing/RouterTest.php @@ -631,8 +631,8 @@ class RouterTest extends CakeTestCase { $request = new CakeRequest(); $request->addParams(array( - 'controller' => 'registrations', 'action' => 'admin_index', - 'plugin' => null, 'prefix' => 'admin', 'admin' => true, + 'controller' => 'registrations', 'action' => 'admin_index', + 'plugin' => null, 'prefix' => 'admin', 'admin' => true, 'url' => array('ext' => 'html', 'url' => 'admin/registrations/index') )); $request->base = ''; @@ -647,8 +647,8 @@ class RouterTest extends CakeTestCase { Router::reload(); $request = new CakeRequest(); $request->addParams(array( - 'controller' => 'subscriptions', 'action' => 'admin_index', - 'plugin' => null, 'admin' => true, + 'controller' => 'subscriptions', 'action' => 'admin_index', + 'plugin' => null, 'admin' => true, 'url' => array('url' => 'admin/subscriptions/index/page:2') )); $request->base = '/magazine'; @@ -688,7 +688,7 @@ class RouterTest extends CakeTestCase { Router::reload(); $request = new CakeRequest(); $request->addParams(array( - 'admin' => true, 'action' => 'index', 'plugin' => null, 'controller' => 'users', + 'admin' => true, 'action' => 'index', 'plugin' => null, 'controller' => 'users', 'url' => array('url' => 'users') )); $request->base = '/'; @@ -743,7 +743,7 @@ class RouterTest extends CakeTestCase { $request = new CakeRequest(); Router::setRequestInfo( $request->addParams(array( - 'plugin' => null, 'controller' => 'pages', 'action' => 'admin_edit', 'pass' => array('284'), + 'plugin' => null, 'controller' => 'pages', 'action' => 'admin_edit', 'pass' => array('284'), 'prefix' => 'admin', 'admin' => true, 'url' => array('url' => 'admin/pages/edit/284') ))->addPaths(array( @@ -762,7 +762,7 @@ class RouterTest extends CakeTestCase { $request = new CakeRequest(); Router::setRequestInfo( $request->addParams(array( - 'plugin' => null, 'controller' => 'pages', 'action' => 'admin_add', 'prefix' => 'admin', + 'plugin' => null, 'controller' => 'pages', 'action' => 'admin_add', 'prefix' => 'admin', 'admin' => true, 'url' => array('url' => 'admin/pages/add') ))->addPaths(array( 'base' => '', 'here' => '/admin/pages/add', 'webroot' => '/' @@ -780,7 +780,7 @@ class RouterTest extends CakeTestCase { $request = new CakeRequest(); Router::setRequestInfo( $request->addParams(array( - 'plugin' => null, 'controller' => 'pages', 'action' => 'admin_edit', 'prefix' => 'admin', + 'plugin' => null, 'controller' => 'pages', 'action' => 'admin_edit', 'prefix' => 'admin', 'admin' => true, 'pass' => array('284'), 'url' => array('url' => 'admin/pages/edit/284') ))->addPaths(array( 'base' => '', 'here' => '/admin/pages/edit/284', 'webroot' => '/' @@ -797,7 +797,7 @@ class RouterTest extends CakeTestCase { Router::parse('/'); Router::setRequestInfo( $request->addParams(array( - 'plugin' => null, 'controller' => 'posts', 'action' => 'admin_index', 'prefix' => 'admin', + 'plugin' => null, 'controller' => 'posts', 'action' => 'admin_index', 'prefix' => 'admin', 'admin' => true, 'pass' => array('284'), 'url' => array('url' => 'admin/posts') ))->addPaths(array( 'base' => '', 'here' => '/admin/posts', 'webroot' => '/' @@ -1186,7 +1186,7 @@ class RouterTest extends CakeTestCase { $paths = App::path('plugins'); App::build(array( 'plugins' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS + CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS ) ), true); CakePlugin::loadAll(); @@ -1514,7 +1514,7 @@ class RouterTest extends CakeTestCase { $request = new CakeRequest(); Router::setRequestInfo( $request->addParams(array( - 'plugin' => null, 'controller' => 'images', 'action' => 'index', + 'plugin' => null, 'controller' => 'images', 'action' => 'index', 'prefix' => null, 'admin' => false,'url' => array('url' => 'images/index') ))->addPaths(array( 'base' => '', @@ -1582,7 +1582,7 @@ class RouterTest extends CakeTestCase { $request = new CakeRequest(); Router::setRequestInfo( $request->addParams(array( - 'plugin' => null, 'controller' => 'images', 'action' => 'index', + 'plugin' => null, 'controller' => 'images', 'action' => 'index', 'prefix' => null, 'protected' => false, 'url' => array('url' => 'images/index') ))->addPaths(array( 'base' => '', @@ -1610,7 +1610,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('action' => 'protected_edit', 1, 'protected' => true)); $expected = '/protected/images/edit/1'; $this->assertEqual($result, $expected); - + $result = Router::url(array('action' => 'protectededit', 1, 'protected' => true)); $expected = '/protected/images/protectededit/1'; $this->assertEqual($result, $expected); @@ -2211,7 +2211,7 @@ class RouterTest extends CakeTestCase { function testConnectDefaultRoutes() { App::build(array( 'plugins' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS + CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS ) ), true); CakePlugin::loadAll(); diff --git a/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php b/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php index f20514fad..4f4ed6b2e 100644 --- a/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php +++ b/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php @@ -23,7 +23,7 @@ App::uses('Controller', 'Controller'); App::uses('CakeHtmlReporter', 'TestSuite/Reporter'); if (!class_exists('AppController', false)) { - require_once LIBS . 'Controller' . DS . 'AppController.php'; + require_once CAKE . 'Controller' . DS . 'AppController.php'; } elseif (!defined('APP_CONTROLLER_EXISTS')) { define('APP_CONTROLLER_EXISTS', true); } @@ -36,8 +36,8 @@ if (!class_exists('AppController', false)) { class CakeTestCaseTest extends CakeTestCase { public static function setUpBeforeClass() { - require_once LIBS . 'Test' . DS . 'Fixture' . DS . 'AssertTagsTestCase.php'; - require_once LIBS . 'Test' . DS . 'Fixture' . DS . 'FixturizedTestCase.php'; + require_once CAKE . 'Test' . DS . 'Fixture' . DS . 'AssertTagsTestCase.php'; + require_once CAKE . 'Test' . DS . 'Fixture' . DS . 'FixturizedTestCase.php'; } /** diff --git a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php index f7fe86db9..22a3ec152 100644 --- a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php +++ b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php @@ -122,10 +122,10 @@ class ControllerTestCaseTest extends CakeTestCase { function setUp() { parent::setUp(); App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), - 'Controller' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Controller' . DS), - 'Model' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS), - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), + 'Controller' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS), + 'Model' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS), + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS) )); CakePlugin::loadAll(); $this->Case = new ControllerTestCase(); @@ -257,7 +257,7 @@ class ControllerTestCaseTest extends CakeTestCase { 'var' => 'string' ); $this->assertEquals($expected, $results); - + $result = $this->Case->controller->response->body(); $this->assertPattern('/This is the TestsAppsController index view/', $result); @@ -273,7 +273,7 @@ class ControllerTestCaseTest extends CakeTestCase { * Tests using loaded routes during tests */ function testUseRoutes() { - include LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; + include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; $controller = $this->Case->generate('TestsApps'); $controller->Components->load('RequestHandler'); $result = $this->Case->testAction('/tests_apps/index.json', array('return' => 'view')); @@ -281,19 +281,19 @@ class ControllerTestCaseTest extends CakeTestCase { $expected = array('cakephp' => 'cool'); $this->assertEquals($result, $expected); - include LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; + include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; $result = $this->Case->testAction('/some_alias'); $this->assertEquals($result, 5); - include LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; + include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; $this->Case->testAction('/redirect_me_now'); $result = $this->Case->headers['Location']; $this->assertEquals($result, 'http://cakephp.org'); - include LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; + include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; $this->Case->testAction('/redirect_me'); $result = $this->Case->headers['Location']; - $this->assertEquals($result, Router::url(array('controller' => 'tests_apps', 'action' => 'some_method'), true)); + $this->assertEquals($result, Router::url(array('controller' => 'tests_apps', 'action' => 'some_method'), true)); } /** @@ -302,7 +302,7 @@ class ControllerTestCaseTest extends CakeTestCase { * @expectedException MissingActionException */ function testSkipRoutes() { - include LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; + include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; $this->Case->loadRoutes = false; $result = $this->Case->testAction('/tests_apps/missing_action.json', array('return' => 'view')); @@ -459,4 +459,4 @@ class ControllerTestCaseTest extends CakeTestCase { $this->assertPattern('/<\/html>/', $result); } -} \ No newline at end of file +} diff --git a/lib/Cake/Test/Case/TestSuite/HtmlCoverageReportTest.php b/lib/Cake/Test/Case/TestSuite/HtmlCoverageReportTest.php index 3df26f39d..08c6d2c99 100644 --- a/lib/Cake/Test/Case/TestSuite/HtmlCoverageReportTest.php +++ b/lib/Cake/Test/Case/TestSuite/HtmlCoverageReportTest.php @@ -45,7 +45,7 @@ class HtmlCoverageReportTest extends CakeTestCase { function testGetPathFilter() { $this->Coverage->appTest = false; $result = $this->Coverage->getPathFilter(); - $this->assertEquals(LIBS, $result); + $this->assertEquals(CAKE, $result); $this->Coverage->appTest = true; $result = $this->Coverage->getPathFilter(); @@ -64,7 +64,7 @@ class HtmlCoverageReportTest extends CakeTestCase { */ function testFilterCoverageDataByPathRemovingElements() { $data = array( - LIBS . 'dispatcher.php' => array( + CAKE . 'dispatcher.php' => array( 10 => -1, 12 => 1 ), @@ -74,8 +74,8 @@ class HtmlCoverageReportTest extends CakeTestCase { ) ); $this->Coverage->setCoverage($data); - $result = $this->Coverage->filterCoverageDataByPath(LIBS); - $this->assertTrue(isset($result[LIBS . 'dispatcher.php'])); + $result = $this->Coverage->filterCoverageDataByPath(CAKE); + $this->assertTrue(isset($result[CAKE . 'dispatcher.php'])); $this->assertFalse(isset($result[APP . 'app_model.php'])); } @@ -178,4 +178,4 @@ class HtmlCoverageReportTest extends CakeTestCase { CakePlugin::unload(); unset($this->Coverage); } -} \ No newline at end of file +} diff --git a/lib/Cake/Test/Case/Utility/FolderTest.php b/lib/Cake/Test/Case/Utility/FolderTest.php index f30c59e43..67dec0869 100644 --- a/lib/Cake/Test/Case/Utility/FolderTest.php +++ b/lib/Cake/Test/Case/Utility/FolderTest.php @@ -147,7 +147,7 @@ class FolderTest extends CakeTestCase { * @return void */ function testOperations() { - $path = LIBS . 'Console' . DS . 'templates' . DS . 'skel'; + $path = CAKE . 'Console' . DS . 'templates' . DS . 'skel'; $Folder = new Folder($path); $result = is_dir($Folder->pwd()); @@ -220,7 +220,7 @@ class FolderTest extends CakeTestCase { public function testChmod() { $this->skipIf(DIRECTORY_SEPARATOR === '\\', '%s Folder permissions tests not supported on Windows'); - $path = LIBS . 'Console' . DS . 'templates' . DS . 'skel'; + $path = CAKE . 'Console' . DS . 'templates' . DS . 'skel'; $Folder = new Folder($path); $subdir = 'test_folder_new'; @@ -316,41 +316,41 @@ class FolderTest extends CakeTestCase { $Folder = new Folder(); $expected = array( array( - LIBS . 'Config', - LIBS . 'Config' . DS . 'unicode', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' + CAKE . 'Config', + CAKE . 'Config' . DS . 'unicode', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' ), array( - LIBS . 'Config' . DS . 'config.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0080_00ff.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0100_017f.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0180_024F.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0250_02af.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0370_03ff.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0400_04ff.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0500_052f.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0530_058f.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '1e00_1eff.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '1f00_1fff.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2100_214f.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2150_218f.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2460_24ff.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2c00_2c5f.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2c60_2c7f.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2c80_2cff.php', - LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . 'ff00_ffef.php' + CAKE . 'Config' . DS . 'config.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0080_00ff.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0100_017f.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0180_024F.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0250_02af.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0370_03ff.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0400_04ff.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0500_052f.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0530_058f.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '1e00_1eff.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '1f00_1fff.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2100_214f.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2150_218f.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2460_24ff.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2c00_2c5f.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2c60_2c7f.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2c80_2cff.php', + CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . 'ff00_ffef.php' ) ); - $result = $Folder->tree(LIBS . 'Config', false); + $result = $Folder->tree(CAKE . 'Config', false); $this->assertIdentical(array_diff($expected[0], $result[0]), array()); $this->assertIdentical(array_diff($result[0], $expected[0]), array()); - $result = $Folder->tree(LIBS . 'Config', false, 'dir'); + $result = $Folder->tree(CAKE . 'Config', false, 'dir'); $this->assertIdentical(array_diff($expected[0], $result), array()); $this->assertIdentical(array_diff($result, $expected[0]), array()); - $result = $Folder->tree(LIBS . 'Config', false, 'files'); + $result = $Folder->tree(CAKE . 'Config', false, 'files'); $this->assertIdentical(array_diff($expected[1], $result), array()); $this->assertIdentical(array_diff($result, $expected[1]), array()); } @@ -486,7 +486,7 @@ class FolderTest extends CakeTestCase { */ function testFind() { $Folder = new Folder(); - $Folder->cd(LIBS . 'Config'); + $Folder->cd(CAKE . 'Config'); $result = $Folder->find(); $expected = array('config.php'); $this->assertIdentical(array_diff($expected, $result), array()); @@ -539,17 +539,17 @@ class FolderTest extends CakeTestCase { */ function testFindRecursive() { $Folder = new Folder(); - $Folder->cd(LIBS); + $Folder->cd(CAKE); $result = $Folder->findRecursive('(config|paths)\.php'); $expected = array( - LIBS . 'Config' . DS . 'config.php' + CAKE . 'Config' . DS . 'config.php' ); $this->assertIdentical(array_diff($expected, $result), array()); $this->assertIdentical(array_diff($result, $expected), array()); $result = $Folder->findRecursive('(config|paths)\.php', true); $expected = array( - LIBS . 'Config' . DS . 'config.php' + CAKE . 'Config' . DS . 'config.php' ); $this->assertIdentical($result, $expected); @@ -583,7 +583,7 @@ class FolderTest extends CakeTestCase { ); $this->assertIdentical($result, $expected); - $Folder->cd(LIBS . 'Config'); + $Folder->cd(CAKE . 'Config'); $Folder->cd(TMP); $Folder->delete($Folder->pwd() . DS . 'testme'); $File->delete(); diff --git a/lib/Cake/Test/Case/Utility/XmlTest.php b/lib/Cake/Test/Case/Utility/XmlTest.php index fbdcfa170..4b77d32d4 100644 --- a/lib/Cake/Test/Case/Utility/XmlTest.php +++ b/lib/Cake/Test/Case/Utility/XmlTest.php @@ -133,7 +133,7 @@ class XmlTest extends CakeTestCase { $this->assertEqual($obj->firstChild->nodeName, 'tag'); $this->assertEqual($obj->firstChild->nodeValue, 'value'); - $xml = LIBS . 'Test' . DS . 'Fixture' . DS . 'sample.xml'; + $xml = CAKE . 'Test' . DS . 'Fixture' . DS . 'sample.xml'; $obj = Xml::build($xml); $this->assertEqual($obj->getName(), 'tags'); $this->assertEqual(count($obj), 2); @@ -374,7 +374,7 @@ class XmlTest extends CakeTestCase { $obj = Xml::build($xml); $this->assertEqual(Xml::toArray($obj), array('tag' => 'name')); - $xml = LIBS . 'Test' . DS . 'Fixture' . DS . 'sample.xml'; + $xml = CAKE . 'Test' . DS . 'Fixture' . DS . 'sample.xml'; $obj = Xml::build($xml); $expected = array( 'tags' => array( @@ -516,7 +516,7 @@ class XmlTest extends CakeTestCase { * @return void */ public function testRss() { - $rss = file_get_contents(LIBS . 'Test' . DS . 'Fixture' . DS . 'rss.xml'); + $rss = file_get_contents(CAKE . 'Test' . DS . 'Fixture' . DS . 'rss.xml'); $rssAsArray = Xml::toArray(Xml::build($rss)); $this->assertEqual($rssAsArray['rss']['@version'], '2.0'); $this->assertEqual(count($rssAsArray['rss']['channel']['item']), 2); @@ -647,7 +647,7 @@ class XmlTest extends CakeTestCase { * @return void */ public function testSoap() { - $xmlRequest = Xml::build(LIBS . 'Test' . DS . 'Fixture' . DS . 'soap_request.xml'); + $xmlRequest = Xml::build(CAKE . 'Test' . DS . 'Fixture' . DS . 'soap_request.xml'); $expected = array( 'Envelope' => array( '@soap:encodingStyle' => 'http://www.w3.org/2001/12/soap-encoding', @@ -660,7 +660,7 @@ class XmlTest extends CakeTestCase { ); $this->assertEqual(Xml::toArray($xmlRequest), $expected); - $xmlResponse = Xml::build(LIBS . 'Test' . DS . 'Fixture' . DS . 'soap_response.xml'); + $xmlResponse = Xml::build(CAKE . 'Test' . DS . 'Fixture' . DS . 'soap_response.xml'); $expected = array( 'Envelope' => array( '@soap:encodingStyle' => 'http://www.w3.org/2001/12/soap-encoding', diff --git a/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php b/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php index d41d86f79..0d6e9fbeb 100644 --- a/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php @@ -84,7 +84,7 @@ class CacheHelperTest extends CakeTestCase { Configure::write('Cache.check', true); Configure::write('Cache.disable', false); App::build(array( - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) ), true); } @@ -422,7 +422,7 @@ class CacheHelperTest extends CakeTestCase { 'cache_parsing' => 21600 ); $this->Controller->request->here = '/cache_test/cache_parsing/1/2/name:mark/ice:cream'; - + $View = new View($this->Controller); $result = $View->render('index'); @@ -442,7 +442,7 @@ class CacheHelperTest extends CakeTestCase { function testCacheWithCustomRoutes() { Router::reload(); Router::connect('/:lang/:controller/:action/*', array(), array('lang' => '[a-z]{3}')); - + $this->Controller->cache_parsing(); $this->Controller->request->addParams(array( 'lang' => 'en', @@ -520,10 +520,10 @@ class CacheHelperTest extends CakeTestCase { $Cache->expects($this->once())->method('cache') ->with('posts/index', $View->output, false); $Cache->afterRender('posts/index'); - + Configure::write('Cache.check', false); $Cache->afterRender('posts/index'); - + Configure::write('Cache.check', true); $View->cacheAction = false; $Cache->afterRender('posts/index'); diff --git a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php index 0a15c691b..13b605367 100644 --- a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php @@ -381,7 +381,7 @@ class HtmlHelperTest extends CakeTestCase { $file = new File($testfile, true); App::build(array( - 'views' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) )); Configure::write('Asset.timestamp', true); Configure::write('debug', 1); @@ -416,10 +416,10 @@ class HtmlHelperTest extends CakeTestCase { */ function testThemeAssetsInMainWebrootPath() { App::build(array( - 'views' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) )); $webRoot = Configure::read('App.www_root'); - Configure::write('App.www_root', LIBS . 'Test' . DS . 'test_app' . DS . 'webroot' . DS); + Configure::write('App.www_root', CAKE . 'Test' . DS . 'test_app' . DS . 'webroot' . DS); $this->Html->theme = 'test_theme'; $result = $this->Html->css('webroot_test'); @@ -662,7 +662,7 @@ class HtmlHelperTest extends CakeTestCase { $file = new File($testfile, true); App::build(array( - 'views' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) )); $this->Html->webroot = '/'; @@ -1383,7 +1383,7 @@ class HtmlHelperTest extends CakeTestCase { */ public function testLoadConfig() { - $path = LIBS . 'Test' . DS . 'test_app' . DS . 'Config'. DS; + $path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS; $result = $this->Html->loadConfig('htmlhelper_tags', $path); $expected = array( @@ -1423,7 +1423,7 @@ class HtmlHelperTest extends CakeTestCase { * @expectedException ConfigureException */ public function testLoadConfigWrongReader() { - $path = LIBS . 'Test' . DS . 'test_app' . DS . 'Config'. DS; + $path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS; $result = $this->Html->loadConfig(array('htmlhelper_tags', 'wrong_reader'), $path); } diff --git a/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php b/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php index d0eae9740..7dcb20bab 100644 --- a/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php @@ -132,7 +132,7 @@ class SessionHelperTest extends CakeTestCase { $this->assertEqual($result, $expected); App::build(array( - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) )); $result = $this->Session->flash('notification'); $result = str_replace("\r\n", "\n", $result); @@ -165,10 +165,10 @@ class SessionHelperTest extends CakeTestCase { */ function testFlashElementInAttrs() { App::build(array( - 'views' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) )); $result = $this->Session->flash('flash', array( - 'element' => 'session_helper', + 'element' => 'session_helper', 'params' => array('title' => 'Notice!', 'name' => 'Alert!') )); $expected = "
\n\t

Alert!

\n\t

Notice!

\n\t

This is a calling

\n
"; diff --git a/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php b/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php index c5e4f1ce1..d1092d862 100644 --- a/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php @@ -656,7 +656,7 @@ class TimeHelperTest extends CakeTestCase { */ function testConvertSpecifiers() { App::build(array( - 'locales' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Locale' . DS) + 'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS) ), true); Configure::write('Config.language', 'time_test'); $time = strtotime('Thu Jan 14 11:43:39 2010'); @@ -765,7 +765,7 @@ class TimeHelperTest extends CakeTestCase { */ function testI18nFormat() { App::build(array( - 'locales' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Locale' . DS) + 'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS) ), true); Configure::write('Config.language', 'time_test'); $time = strtotime('Thu Jan 14 13:59:28 2010'); diff --git a/lib/Cake/Test/Case/View/HelperCollectionTest.php b/lib/Cake/Test/Case/View/HelperCollectionTest.php index d3d093882..1d3eae5c2 100644 --- a/lib/Cake/Test/Case/View/HelperCollectionTest.php +++ b/lib/Cake/Test/Case/View/HelperCollectionTest.php @@ -82,7 +82,7 @@ class HelperCollectionTest extends CakeTestCase { $result = $this->Helpers->load('Html'); $this->assertInstanceOf('HtmlAliasHelper', $result); - App::build(array('plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS))); + App::build(array('plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS))); CakePlugin::loadAll(); $result = $this->Helpers->load('SomeOther', array('className' => 'TestPlugin.OtherHelper')); $this->assertInstanceOf('OtherHelperHelper', $result); @@ -123,7 +123,7 @@ class HelperCollectionTest extends CakeTestCase { */ function testLoadPluginHelper() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), )); CakePlugin::loadAll(); $result = $this->Helpers->load('TestPlugin.OtherHelper'); @@ -153,4 +153,4 @@ class HelperCollectionTest extends CakeTestCase { $this->assertEquals(array('Form'), $result, 'loaded helpers is wrong'); } -} \ No newline at end of file +} diff --git a/lib/Cake/Test/Case/View/HelperTest.php b/lib/Cake/Test/Case/View/HelperTest.php index f04834863..547c449c7 100644 --- a/lib/Cake/Test/Case/View/HelperTest.php +++ b/lib/Cake/Test/Case/View/HelperTest.php @@ -172,10 +172,10 @@ class TestHelper extends Helper { /** * expose a method as public * - * @param string $options - * @param string $exclude - * @param string $insertBefore - * @param string $insertAfter + * @param string $options + * @param string $exclude + * @param string $insertBefore + * @param string $insertAfter * @return void */ function parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) { @@ -518,8 +518,8 @@ class HelperTest extends CakeTestCase { $_timestamp = Configure::read('Asset.timestamp'); Configure::write('Asset.timestamp', 'force'); App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS), )); CakePlugin::loadAll(); @@ -759,7 +759,7 @@ class HelperTest extends CakeTestCase { $this->Helper->theme = 'test_theme'; App::build(array( - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) )); $result = $this->Helper->webroot('/img/cake.power.gif'); @@ -771,7 +771,7 @@ class HelperTest extends CakeTestCase { $this->assertEqual($result, $expected); $webRoot = Configure::read('App.www_root'); - Configure::write('App.www_root', LIBS . 'Test' . DS . 'test_app' . DS . 'webroot' . DS); + Configure::write('App.www_root', CAKE . 'Test' . DS . 'test_app' . DS . 'webroot' . DS); $result = $this->Helper->webroot('/img/cake.power.gif'); $expected = '/theme/test_theme/img/cake.power.gif'; @@ -799,7 +799,7 @@ class HelperTest extends CakeTestCase { */ function testLazyLoadingHelpers() { App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), )); CakePlugin::loadAll(); $Helper = new TestHelper($this->View); diff --git a/lib/Cake/Test/Case/View/MediaViewTest.php b/lib/Cake/Test/Case/View/MediaViewTest.php index 2a8cd5b86..1ddc7bc23 100644 --- a/lib/Cake/Test/Case/View/MediaViewTest.php +++ b/lib/Cake/Test/Case/View/MediaViewTest.php @@ -72,7 +72,7 @@ class MediaViewTest extends CakeTestCase { */ function testRender() { $this->MediaView->viewVars = array( - 'path' => LIBS . 'Test' . DS . 'test_app' . DS . 'Vendor' . DS .'css' . DS, + 'path' => CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor' . DS .'css' . DS, 'id' => 'test_asset.css', 'extension' => 'css', ); @@ -120,7 +120,7 @@ class MediaViewTest extends CakeTestCase { $currentUserAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null; $_SERVER['HTTP_USER_AGENT'] = 'Some generic browser'; $this->MediaView->viewVars = array( - 'path' => LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS, + 'path' => CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS, 'id' => 'no_section.ini', 'extension' => 'ini', ); @@ -180,7 +180,7 @@ class MediaViewTest extends CakeTestCase { $currentUserAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null; $_SERVER['HTTP_USER_AGENT'] = 'Opera/9.80 (Windows NT 6.0; U; en) Presto/2.8.99 Version/11.10'; $this->MediaView->viewVars = array( - 'path' => LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS, + 'path' => CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS, 'id' => 'no_section.ini', 'extension' => 'ini', ); @@ -245,7 +245,7 @@ class MediaViewTest extends CakeTestCase { $currentUserAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null; $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; Media Center PC 4.0; SLCC1; .NET CLR 3.0.04320)'; $this->MediaView->viewVars = array( - 'path' => LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS, + 'path' => CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS, 'id' => 'no_section.ini', 'extension' => 'ini', ); @@ -308,7 +308,7 @@ class MediaViewTest extends CakeTestCase { */ function testConnectionAborted() { $this->MediaView->viewVars = array( - 'path' => LIBS . 'Test' . DS . 'test_app' . DS . 'Vendor' . DS .'css' . DS, + 'path' => CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor' . DS .'css' . DS, 'id' => 'test_asset.css', 'extension' => 'css', ); @@ -332,7 +332,7 @@ class MediaViewTest extends CakeTestCase { */ function testConnectionAbortedOnBuffering() { $this->MediaView->viewVars = array( - 'path' => LIBS . 'Test' . DS . 'test_app' . DS . 'Vendor' . DS .'css' . DS, + 'path' => CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor' . DS .'css' . DS, 'id' => 'test_asset.css', 'extension' => 'css', ); diff --git a/lib/Cake/Test/Case/View/ThemeViewTest.php b/lib/Cake/Test/Case/View/ThemeViewTest.php index 3ca49982f..f13f62192 100644 --- a/lib/Cake/Test/Case/View/ThemeViewTest.php +++ b/lib/Cake/Test/Case/View/ThemeViewTest.php @@ -35,7 +35,7 @@ class ThemePostsController extends Controller { * @access public */ public $name = 'ThemePosts'; - + public $theme = null; /** @@ -117,8 +117,8 @@ class ThemeViewTest extends CakeTestCase { $this->PostsController->index(); $this->ThemeView = new ThemeView($this->PostsController); App::build(array( - 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), - 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS) + 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), + 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) )); CakePlugin::loadAll(); } @@ -152,15 +152,15 @@ class ThemeViewTest extends CakeTestCase { $this->Controller->theme = 'TestTheme'; $ThemeView = new TestThemeView($this->Controller); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Plugins' . DS . 'TestPlugin' . DS . 'Tests' . DS .'index.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Plugins' . DS . 'TestPlugin' . DS . 'Tests' . DS .'index.ctp'; $result = $ThemeView->getViewFileName('index'); $this->assertEqual($result, $expected); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Plugins' . DS . 'TestPlugin' . DS . 'Layouts' . DS .'plugin_default.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Plugins' . DS . 'TestPlugin' . DS . 'Layouts' . DS .'plugin_default.ctp'; $result = $ThemeView->getLayoutFileName('plugin_default'); $this->assertEqual($result, $expected); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Layouts' . DS .'default.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Layouts' . DS .'default.ctp'; $result = $ThemeView->getLayoutFileName('default'); $this->assertEqual($result, $expected); } @@ -180,25 +180,25 @@ class ThemeViewTest extends CakeTestCase { $ThemeView = new TestThemeView($this->Controller); $ThemeView->theme = 'TestTheme'; - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Pages' . DS .'home.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Pages' . DS .'home.ctp'; $result = $ThemeView->getViewFileName('home'); $this->assertEqual($result, $expected); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Posts' . DS .'index.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Posts' . DS .'index.ctp'; $result = $ThemeView->getViewFileName('/Posts/index'); $this->assertEqual($result, $expected); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Layouts' . DS .'default.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Layouts' . DS .'default.ctp'; $result = $ThemeView->getLayoutFileName(); $this->assertEqual($result, $expected); $ThemeView->layoutPath = 'rss'; - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'rss' . DS . 'default.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'rss' . DS . 'default.ctp'; $result = $ThemeView->getLayoutFileName(); $this->assertEqual($result, $expected); $ThemeView->layoutPath = 'emails' . DS . 'html'; - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'emails' . DS . 'html' . DS . 'default.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'emails' . DS . 'html' . DS . 'default.ctp'; $result = $ThemeView->getLayoutFileName(); $this->assertEqual($result, $expected); } diff --git a/lib/Cake/Test/Case/View/ViewTest.php b/lib/Cake/Test/Case/View/ViewTest.php index eac6401fc..0c9a94680 100644 --- a/lib/Cake/Test/Case/View/ViewTest.php +++ b/lib/Cake/Test/Case/View/ViewTest.php @@ -197,7 +197,7 @@ class ViewTest extends CakeTestCase { App::build(array( 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), 'View' => array( - LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS + CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS ) ), true); CakePlugin::loadAll(); @@ -260,12 +260,12 @@ class ViewTest extends CakeTestCase { $paths = $View->paths('TestPlugin'); $pluginPath = CakePlugin::path('TestPlugin'); $expected = array( - LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Plugins' . DS . 'TestPlugin' . DS, + CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Plugins' . DS . 'TestPlugin' . DS, $pluginPath . 'View' . DS, $pluginPath . 'views' . DS, $pluginPath . 'Lib' . DS . 'View' . DS, - LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS, - LIBS . 'View' . DS + CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS, + CAKE . 'View' . DS ); $this->assertEqual($paths, $expected); } @@ -288,7 +288,7 @@ class ViewTest extends CakeTestCase { )); $pluginPath = CakePlugin::path('TestPlugin'); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS .'TestPlugin' . DS . 'View' . DS .'Tests' . DS .'index.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS .'TestPlugin' . DS . 'View' . DS .'Tests' . DS .'index.ctp'; $result = $View->getViewFileName('index'); $this->assertEqual($result, $expected); @@ -312,29 +312,29 @@ class ViewTest extends CakeTestCase { $View = new TestView($this->Controller); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Pages' . DS .'home.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Pages' . DS .'home.ctp'; $result = $View->getViewFileName('home'); $this->assertEqual($result, $expected); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Posts' . DS .'index.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Posts' . DS .'index.ctp'; $result = $View->getViewFileName('/Posts/index'); $this->assertEqual($result, $expected); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Posts' . DS .'index.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Posts' . DS .'index.ctp'; $result = $View->getViewFileName('../Posts/index'); $this->assertEqual($result, $expected); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS .'default.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS .'default.ctp'; $result = $View->getLayoutFileName(); $this->assertEqual($result, $expected); $View->layoutPath = 'rss'; - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'rss' . DS . 'default.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'rss' . DS . 'default.ctp'; $result = $View->getLayoutFileName(); $this->assertEqual($result, $expected); $View->layoutPath = 'emails' . DS . 'html'; - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'emails' . DS . 'html' . DS . 'default.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'emails' . DS . 'html' . DS . 'default.ctp'; $result = $View->getLayoutFileName(); $this->assertEqual($result, $expected); @@ -762,7 +762,7 @@ class ViewTest extends CakeTestCase { $result = $View->getViewFileName('../Themed/TestTheme/Posts/index'); $this->assertPattern('/Themed(\/|\\\)TestTheme(\/|\\\)Posts(\/|\\\)index.ctp/', $result); - $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Posts' . DS .'index.ctp'; + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Posts' . DS .'index.ctp'; $result = $View->getViewFileName('../Posts/index'); $this->assertEqual($result, $expected); diff --git a/lib/Cake/Test/test_app/View/Posts/test_nocache_tags.ctp b/lib/Cake/Test/test_app/View/Posts/test_nocache_tags.ctp index 3375d8fbf..91e85702d 100644 --- a/lib/Cake/Test/test_app/View/Posts/test_nocache_tags.ctp +++ b/lib/Cake/Test/test_app/View/Posts/test_nocache_tags.ctp @@ -76,7 +76,7 @@ @@ -138,4 +138,4 @@ if (!empty($filePresent)):
  • irc.freenode.net #cakephp
  • - \ No newline at end of file + diff --git a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php index 1cd0242dc..c63a96a2c 100644 --- a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php +++ b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php @@ -17,7 +17,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -define('CORE_TEST_CASES', LIBS . 'Test' . DS . 'Case'); +define('CORE_TEST_CASES', CAKE . 'Test' . DS . 'Case'); define('APP_TEST_CASES', TESTS . 'Case'); App::uses('CakeTestSuiteCommand', 'TestSuite'); diff --git a/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php b/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php index 3a04a946c..377211e50 100644 --- a/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php +++ b/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php @@ -45,7 +45,7 @@ abstract class BaseCoverageReport { /** * Array of test case file names. Used to do basename() matching with - * files that have coverage to decide which results to show on page load. + * files that have coverage to decide which results to show on page load. * * @var array */ @@ -101,7 +101,7 @@ abstract class BaseCoverageReport { } elseif ($this->pluginTest) { $path = App::pluginPath($this->pluginTest); } else { - $path = LIBS; + $path = CAKE; } return $path; } @@ -168,4 +168,4 @@ abstract class BaseCoverageReport { */ abstract public function generateDiff($filename, $fileLines, $coverageData); -} \ No newline at end of file +} diff --git a/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php index 246251aed..a820889bb 100644 --- a/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php +++ b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php @@ -105,7 +105,7 @@ class CakeFixtureManager { if (strpos($fixture, 'core.') === 0) { $fixture = substr($fixture, strlen('core.')); - $fixturePaths[] = LIBS . 'Test' . DS . 'Fixture'; + $fixturePaths[] = CAKE . 'Test' . DS . 'Fixture'; } elseif (strpos($fixture, 'app.') === 0) { $fixture = substr($fixture, strlen('app.')); $fixturePaths = array( @@ -122,7 +122,7 @@ class CakeFixtureManager { } else { $fixturePaths = array( TESTS . 'Fixture', - LIBS . 'tests' . DS . 'Fixture' + CAKE . 'tests' . DS . 'Fixture' ); } @@ -250,4 +250,4 @@ class CakeFixtureManager { } } } -} \ No newline at end of file +} diff --git a/lib/Cake/Utility/Debugger.php b/lib/Cake/Utility/Debugger.php index ff14957ba..7f43d8ce2 100644 --- a/lib/Cake/Utility/Debugger.php +++ b/lib/Cake/Utility/Debugger.php @@ -397,8 +397,8 @@ class Debugger { } elseif (strpos($path, ROOT) === 0) { return str_replace(ROOT, 'ROOT', $path); } - - if (strpos($path, LIBS) === 0) { + + if (strpos($path, CAKE) === 0) { return str_replace($corePath, 'CORE' . DS, $path); } return $path; @@ -565,7 +565,7 @@ class Debugger { /** * Takes a processed array of data from an error and displays it in the chosen format. * - * @param string $data + * @param string $data * @return void */ public function outputError($data) { diff --git a/lib/Cake/View/ScaffoldView.php b/lib/Cake/View/ScaffoldView.php index 746e84eea..01ebfe9d2 100644 --- a/lib/Cake/View/ScaffoldView.php +++ b/lib/Cake/View/ScaffoldView.php @@ -80,7 +80,7 @@ class ScaffoldView extends ThemeView { } if ($name === 'scaffolds' . DS . $subDir . 'error') { - return LIBS . 'View' . DS . 'errors' . DS . 'scaffold_error.ctp'; + return CAKE . 'View' . DS . 'errors' . DS . 'scaffold_error.ctp'; } throw new MissingViewException($paths[0] . $name . $this->ext); diff --git a/lib/Cake/bootstrap.php b/lib/Cake/bootstrap.php index 72e97269e..d842f3b9d 100644 --- a/lib/Cake/bootstrap.php +++ b/lib/Cake/bootstrap.php @@ -51,7 +51,7 @@ if (!defined('APP')) { /** * Path to the application's libs directory. */ - define('APPLIBS', APP.'Lib'.DS); + define('APPCAKE', APP.'Lib'.DS); /** * Path to the configuration files directory. @@ -60,11 +60,6 @@ if (!defined('CONFIGS')) { define('CONFIGS', APP.'Config'.DS); } -/** - * Path to the libs directory. - */ - define('LIBS', CAKE); - /** * Path to the public CSS directory. */ @@ -140,9 +135,9 @@ if (!defined('JS_URL')) { } -require LIBS . 'basics.php'; -require LIBS . 'Core' . DS .'App.php'; -require LIBS . 'Error' . DS . 'exceptions.php'; +require CAKE . 'basics.php'; +require CAKE . 'Core' . DS .'App.php'; +require CAKE . 'Error' . DS . 'exceptions.php'; spl_autoload_register(array('App', 'load')); diff --git a/lib/Cake/tests/test_app/View/posts/test_nocache_tags.ctp b/lib/Cake/tests/test_app/View/posts/test_nocache_tags.ctp new file mode 100644 index 000000000..20909edc5 --- /dev/null +++ b/lib/Cake/tests/test_app/View/posts/test_nocache_tags.ctp @@ -0,0 +1,142 @@ + +

    + + + + + +

    +

    + + ' . $settings['engine']; + echo __d('cake', ' is being used to cache, to change this edit config/core.php '); + echo '

    '; + + echo 'Settings:
      '; + foreach ($settings as $name => $value): + echo '
    • ' . $name . ': ' . $value . '
    • '; + endforeach; + echo '
    '; + + else: + echo __d('cake', 'NOT working.'); + echo '
    '; + if (is_writable(TMP)): + echo __d('cake', 'Edit: config/core.php to insure you have the newset version of this file and the variable $cakeCache set properly'); + endif; + endif; + ?> + +

    +

    + + '; + echo __d('cake', 'Rename config/database.php.default to config/database.php'); + endif; + ?> + +

    + +

    + + isConnected()): + __d('cake', ' is able to '); + else: + __d('cake', ' is NOT able to '); + endif; + __d('cake', 'connect to the database.'); + ?> + +

    + +

    + +

    +

    +
    +
    +
    + +

    +

    +

    +
    +
    + +

    +

    +

    + +

    +

    + +

    + \ No newline at end of file