Search and replace for changed paths

This commit is contained in:
Jose Lorenzo Rodriguez 2011-05-13 02:53:35 -04:30
parent 3b725290ba
commit 8746a485bd
29 changed files with 64 additions and 64 deletions

View file

@ -315,7 +315,7 @@ class Controller extends Object {
}
if ($this->viewPath == null) {
$this->viewPath = Inflector::underscore($this->name);
$this->viewPath = $this->name;
}
$this->modelClass = Inflector::singularize($this->name);

View file

@ -90,7 +90,7 @@ class CacheTest extends CakeTestCase {
function testConfigWithLibAndPluginEngines() {
App::build(array(
'Lib' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'Lib' . DS),
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
CakePlugin::load('TestPlugin');
@ -253,7 +253,7 @@ class CacheTest extends CakeTestCase {
function testDrop() {
App::build(array(
'libs' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'libs' . DS),
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
$result = Cache::drop('some_config_that_does_not_exist');
@ -306,7 +306,7 @@ class CacheTest extends CakeTestCase {
function testWriteTriggerError() {
App::build(array(
'libs' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'libs' . DS),
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
Cache::config('test_trigger', array('engine' => 'TestAppCache', 'prefix' => ''));

View file

@ -83,7 +83,7 @@ class PhpReaderTest extends CakeTestCase {
*/
function testReadPluginValue() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
CakePlugin::load('TestPlugin');
$reader = new PhpReader($this->path);

View file

@ -187,7 +187,7 @@ class SchemaShellTest extends CakeTestCase {
*/
public function testViewWithPlugins() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . '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 . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
$this->Shell->args = array('TestPlugin.TestPluginApp');
@ -336,7 +336,7 @@ class SchemaShellTest extends CakeTestCase {
*/
public function testGenerateWithPlugins() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
CakePlugin::load('TestPlugin');
@ -450,7 +450,7 @@ class SchemaShellTest extends CakeTestCase {
*/
public function testPluginParam() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
$this->Shell->params = array(
@ -470,7 +470,7 @@ class SchemaShellTest extends CakeTestCase {
*/
public function testPluginDotSyntaxWithCreate() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
$this->Shell->params = array(

View file

@ -169,7 +169,7 @@ class ShellTest extends CakeTestCase {
*/
public function testInitialize() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'models' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'Model' . DS)
), true);

View file

@ -88,7 +88,7 @@ class TaskCollectionTest extends CakeTestCase {
$dispatcher = $this->getMock('ShellDispatcher', array(), array(), '', false);
$shell = $this->getMock('Shell', array(), array(), '', false);
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
$this->Tasks = new TaskCollection($shell, $dispatcher);

View file

@ -155,7 +155,7 @@ class FormAuthenticateTest extends CakeTestCase {
function testPluginModel() {
Cache::delete('object_map', '_cake_core_');
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
), true);
CakePlugin::load('TestPlugin');

View file

@ -799,7 +799,7 @@ HTMLBLOC;
function testPluginCustomViewClass() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'View' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'View'. DS)
));

View file

@ -84,7 +84,7 @@ class ComponentCollectionTest extends CakeTestCase {
$result = $this->Components->load('Cookie');
$this->assertInstanceOf('CookieAliasComponent', $result);
App::build(array('plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)));
App::build(array('plugins' => array(LIBS . '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 . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
));
CakePlugin::load('TestPlugin');
$result = $this->Components->load('TestPlugin.OtherComponent');

View file

@ -251,7 +251,7 @@ class ComponentTest extends CakeTestCase {
function setUp() {
$this->_pluginPaths = App::path('plugins');
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
}

View file

@ -439,7 +439,7 @@ class ControllerTest extends CakeTestCase {
*/
function testLoadModelInPlugins() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'Controller' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'Controller' . DS),
'Model' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'Model' . DS)
));
@ -482,7 +482,7 @@ class ControllerTest extends CakeTestCase {
unset($Controller);
App::build(array('plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)));
App::build(array('plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)));
CakePlugin::load('TestPlugin');
$Controller = new Controller($request);

View file

@ -280,7 +280,7 @@ class ScaffoldViewTest extends CakeTestCase {
App::build(array(
'View' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'View' . DS),
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
}

View file

@ -318,7 +318,7 @@ class AppImportTest extends CakeTestCase {
function testListObjectsInPlugin() {
App::build(array(
'Model' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'Model' . DS),
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::loadAll();
@ -369,7 +369,7 @@ class AppImportTest extends CakeTestCase {
*/
function testPluginPath() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::loadAll();
@ -491,7 +491,7 @@ class AppImportTest extends CakeTestCase {
function testPluginImporting() {
App::build(array(
'libs' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'Lib' . DS),
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::loadAll();
@ -668,7 +668,7 @@ class AppImportTest extends CakeTestCase {
function testLoadingVendor() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'vendors' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'vendors'. DS),
), App::RESET);
CakePlugin::loadAll();
@ -726,7 +726,7 @@ class AppImportTest extends CakeTestCase {
public function testLoadClassInLibs() {
App::build(array(
'libs' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'libs' . DS),
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), App::RESET);
CakePlugin::loadAll();

View file

@ -241,7 +241,7 @@ class ConfigureTest extends CakeTestCase {
* @return void
*/
function testLoadPlugin() {
App::build(array('plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)), true);
App::build(array('plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)), true);
Configure::config('test', new PhpReader());
CakePlugin::load('TestPlugin');
$result = Configure::load('TestPlugin.load', 'test');

View file

@ -716,7 +716,7 @@ class ObjectTest extends CakeTestCase {
*/
function testRequestActionPlugins() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
));
CakePlugin::loadAll();
Router::reload();

View file

@ -35,7 +35,7 @@ class I18nTest extends CakeTestCase {
Cache::delete('object_map', '_cake_core_');
App::build(array(
'locales' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'locale' . DS),
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
CakePlugin::loadAll();
}
@ -2432,7 +2432,7 @@ class I18nTest extends CakeTestCase {
*/
function testPluginTranslation() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
Configure::write('Config.language', 'po');

View file

@ -48,7 +48,7 @@ class CakeLogTest extends CakeTestCase {
function testImportingLoggers() {
App::build(array(
'libs' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'Lib' . DS),
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
CakePlugin::load('TestPlugin');

View file

@ -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 . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)));
App::build(array('plugins' => array(LIBS . '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);

View file

@ -665,7 +665,7 @@ class CakeSchemaTest extends CakeTestCase {
function testSchemaReadWithPlugins() {
App::objects('model', null, false);
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . '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 . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
$Other = $this->Schema->load(array('name' => 'TestPluginApp', 'plugin' => 'TestPlugin'));

View file

@ -80,7 +80,7 @@ class ConnectionManagerTest extends CakeTestCase {
*/
function testGetPluginDataSource() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . '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 . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . '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 . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
$name = 'test_local_source_and_plugin_driver';
@ -149,7 +149,7 @@ class ConnectionManagerTest extends CakeTestCase {
*/
function testGetPluginDataSourceAndLocalDriver() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'Model/Datasource/Database' => array(
LIBS . 'tests' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS . 'Database' . DS
)
@ -272,7 +272,7 @@ class ConnectionManagerTest extends CakeTestCase {
*/
function testConnectionData() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'Model/Datasource' => array(
LIBS . 'tests' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS
)

View file

@ -530,7 +530,7 @@ class CakeSessionTest extends CakeTestCase {
'Model/Datasource/Session' => array(
LIBS . 'tests' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS . 'Session' . DS
),
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
Configure::write('Session', array(
'defaults' => 'cake',
@ -551,7 +551,7 @@ class CakeSessionTest extends CakeTestCase {
*/
function testUsingPluginHandler() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
Configure::write('Session', array(

View file

@ -1042,7 +1042,7 @@ class DispatcherTest extends CakeTestCase {
}
Router::reload();
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
CakePlugin::loadAll();
@ -1142,7 +1142,7 @@ class DispatcherTest extends CakeTestCase {
public function testTestPluginDispatch() {
$Dispatcher = new TestDispatcher();
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::loadAll();
Router::reload();
@ -1200,7 +1200,7 @@ class DispatcherTest extends CakeTestCase {
Router::reload();
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'vendors' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'vendors'. DS),
'View' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'View'. DS)
));

View file

@ -122,7 +122,7 @@ class ControllerTestCaseTest extends CakeTestCase {
function setUp() {
parent::setUp();
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'Controller' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'Controller' . DS),
'Model' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'Model' . DS),
'View' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'View' . DS)

View file

@ -82,7 +82,7 @@ class HelperCollectionTest extends CakeTestCase {
$result = $this->Helpers->load('Html');
$this->assertInstanceOf('HtmlAliasHelper', $result);
App::build(array('plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)));
App::build(array('plugins' => array(LIBS . '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 . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
));
CakePlugin::loadAll();
$result = $this->Helpers->load('TestPlugin.OtherHelper');

View file

@ -518,7 +518,7 @@ class HelperTest extends CakeTestCase {
$_timestamp = Configure::read('Asset.timestamp');
Configure::write('Asset.timestamp', 'force');
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'View' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'View' . DS),
));
CakePlugin::loadAll();
@ -799,7 +799,7 @@ class HelperTest extends CakeTestCase {
*/
function testLazyLoadingHelpers() {
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
));
CakePlugin::loadAll();
$Helper = new TestHelper($this->View);

View file

@ -117,7 +117,7 @@ class ThemeViewTest extends CakeTestCase {
$this->PostsController->index();
$this->ThemeView = new ThemeView($this->PostsController);
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'View' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'View'. DS)
));
CakePlugin::loadAll();

View file

@ -195,9 +195,9 @@ class ViewTest extends CakeTestCase {
$this->PostsController->index();
$this->View = new View($this->PostsController);
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'View' => array(
LIBS . 'tests' . DS . 'test_app' . DS . 'View'. DS
LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS
)
), true);
CakePlugin::loadAll();
@ -227,16 +227,16 @@ class ViewTest extends CakeTestCase {
function testPluginGetTemplate() {
$this->Controller->plugin = 'TestPlugin';
$this->Controller->name = 'TestPlugin';
$this->Controller->viewPath = 'tests';
$this->Controller->viewPath = 'Tests';
$this->Controller->action = 'index';
$View = new TestView($this->Controller);
$expected = CakePlugin::path('TestPlugin') . 'View' . DS .'tests' . DS .'index.ctp';
$expected = CakePlugin::path('TestPlugin') . 'View' . DS .'Tests' . DS .'index.ctp';
$result = $View->getViewFileName('index');
$this->assertEqual($result, $expected);
$expected = CakePlugin::path('TestPlugin') . 'View' . DS . 'layouts' . DS .'default.ctp';
$expected = CakePlugin::path('TestPlugin') . 'View' . DS . 'Layouts' . DS .'default.ctp';
$result = $View->getLayoutFileName();
$this->assertEqual($result, $expected);
}
@ -249,7 +249,7 @@ class ViewTest extends CakeTestCase {
function testPluginPathGeneration() {
$this->Controller->plugin = 'TestPlugin';
$this->Controller->name = 'TestPlugin';
$this->Controller->viewPath = 'tests';
$this->Controller->viewPath = 'Tests';
$this->Controller->action = 'index';
$View = new TestView($this->Controller);
@ -278,12 +278,12 @@ class ViewTest extends CakeTestCase {
function testCamelCasePluginGetTemplate() {
$this->Controller->plugin = 'TestPlugin';
$this->Controller->name = 'TestPlugin';
$this->Controller->viewPath = 'tests';
$this->Controller->viewPath = 'Tests';
$this->Controller->action = 'index';
$View = new TestView($this->Controller);
App::build(array(
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'View' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'View'. DS)
));

View file

@ -740,7 +740,7 @@ class View extends Object {
$subDir = $this->layoutPath . DS;
}
$paths = $this->_paths($this->plugin);
$file = 'layouts' . DS . $subDir . $name;
$file = 'Layouts' . DS . $subDir . $name;
$exts = $this->_getExtensions();
foreach ($exts as $ext) {
@ -780,8 +780,8 @@ class View extends Object {
$exts = $this->_getExtensions();
foreach ($exts as $ext) {
foreach ($paths as $path) {
if (file_exists($path . 'elements' . DS . $name . $ext)) {
return $path . 'elements' . DS . $name . $ext;
if (file_exists($path . 'Elements' . DS . $name . $ext)) {
return $path . 'Elements' . DS . $name . $ext;
}
}
}

View file

@ -86,20 +86,20 @@ if (!defined('APP')) {
/**
* Path to the application's view's layouts directory.
*/
define('LAYOUTS', VIEWS.'layouts'.DS);
define('LAYOUTS', VIEWS.'Layouts'.DS);
/**
* Path to the application's view's elements directory.
* It's supposed to hold pieces of PHP/HTML that are used on multiple pages
* and are not linked to a particular layout (like polls, footers and so on).
*/
define('ELEMENTS', VIEWS.'elements'.DS);
define('ELEMENTS', VIEWS.'Elements'.DS);
/**
* Path to the configuration files directory.
*/
if (!defined('CONFIGS')) {
define('CONFIGS', APP.'config'.DS);
define('CONFIGS', APP.'Config'.DS);
}
/**
@ -138,7 +138,7 @@ if (!defined('TESTS')) {
* Path to the core tests directory.
*/
if (!defined('CAKE_TESTS')) {
define('CAKE_TESTS', CAKE.'tests'.DS);
define('CAKE_TESTS', CAKE.'Test'.DS);
}
/**