Skip to content

Commit

Permalink
More string replacing for new paths
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed May 13, 2011
1 parent 649b863 commit 2a54f09
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/Task/PluginTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class PluginTask extends Shell {
* @return void
*/
function initialize() {
$this->path = APP . 'plugins' . DS;
$this->path = APP . 'Plugin' . DS;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Console/Command/SchemaShellTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ public function testPluginParam() {
'connection' => 'test'
);
$this->Shell->startup();
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'plugins' . DS . 'TestPlugin' . DS . 'Config' . DS . 'Schema';
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'Config' . DS . 'Schema';
$this->assertEqual($this->Shell->Schema->path, $expected);
CakePlugin::unload();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ public function testBakeWithPlugin() {
$uses = array('Comment', 'User');

//fake plugin path
CakePlugin::load('ControllerTest', array('path' => APP . 'plugins' . DS . 'ControllerTest' . DS));
$path = APP . 'plugins' . DS . 'ControllerTest' . DS . 'Controller' . DS . 'ArticlesController.php';
CakePlugin::load('ControllerTest', array('path' => APP . 'Plugin' . DS . 'ControllerTest' . DS));
$path = APP . 'Plugin' . DS . 'ControllerTest' . DS . 'Controller' . DS . 'ArticlesController.php';

$this->Task->expects($this->at(1))->method('createFile')->with(
$path,
Expand All @@ -316,7 +316,7 @@ public function testBakeWithPlugin() {
$this->Task->bake('Articles', '--actions--', array(), array(), array());

$this->Task->plugin = 'ControllerTest';
$path = APP . 'plugins' . DS . 'ControllerTest' . DS . 'Controller' . DS . 'ArticlesController.php';
$path = APP . 'Plugin' . DS . 'ControllerTest' . DS . 'Controller' . DS . 'ArticlesController.php';
$this->Task->bake('Articles', '--actions--', array(), array(), array());

$this->assertEqual($this->Task->Template->templateVars['plugin'], 'ControllerTest');
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,10 @@ public function testGeneratePluginFixtureFile() {
$this->Task->connection = 'test';
$this->Task->path = '/my/path/';
$this->Task->plugin = 'TestFixture';
$filename = APP . 'plugins' . DS . 'TestFixture' . DS . 'tests' . DS . 'Fixture' . DS . 'ArticleFixture.php';
$filename = APP . 'Plugin' . DS . 'TestFixture' . DS . 'tests' . DS . 'Fixture' . DS . 'ArticleFixture.php';

//fake plugin path
CakePlugin::load('TestFixture', array('path' => APP . 'plugins' . DS . 'TestFixture' . DS));
CakePlugin::load('TestFixture', array('path' => APP . 'Plugin' . DS . 'TestFixture' . DS));
$this->Task->expects($this->at(0))->method('createFile')
->with($filename, new PHPUnit_Framework_Constraint_PCREMatch('/Article/'));

Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -746,8 +746,8 @@ public function testBakeWithPlugin() {
$this->Task->plugin = 'ControllerTest';

//fake plugin path
CakePlugin::load('ControllerTest', array('path' => APP . 'plugins' . DS . 'ControllerTest' . DS));
$path = APP . 'plugins' . DS . 'ControllerTest' . DS . 'Model' . DS . 'BakeArticle.php';
CakePlugin::load('ControllerTest', array('path' => APP . 'Plugin' . DS . 'ControllerTest' . DS));
$path = APP . 'Plugin' . DS . 'ControllerTest' . DS . 'Model' . DS . 'BakeArticle.php';
$this->Task->expects($this->once())->method('createFile')
->with($path, new PHPUnit_Framework_Constraint_PCREMatch('/BakeArticle extends ControllerTestAppModel/'));

Expand Down
8 changes: 4 additions & 4 deletions lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,8 @@ public function testBakeWithPlugin() {
$this->Task->plugin = 'TestTest';

//fake plugin path
CakePlugin::load('TestTest', array('path' => APP . 'plugins' . DS . 'TestTest' . DS));
$path = APP . 'plugins' . DS . 'TestTest' . DS . 'tests' . DS . 'Case' . DS . 'View' . DS . 'Helper' . DS .'FormHelperTest.php';
CakePlugin::load('TestTest', array('path' => APP . 'Plugin' . DS . 'TestTest' . DS));
$path = APP . 'Plugin' . DS . 'TestTest' . DS . 'tests' . DS . 'Case' . DS . 'View' . DS . 'Helper' . DS .'FormHelperTest.php';
$this->Task->expects($this->once())->method('createFile')
->with($path, new PHPUnit_Framework_Constraint_IsAnything());

Expand Down Expand Up @@ -596,10 +596,10 @@ public function testTestCaseFileName() {
$expected = $this->Task->path . 'Case' . DS . 'Controller' . DS . 'Component' . DS . 'AuthComponentTest.php';
$this->assertEqual($result, $expected);

CakePlugin::load('TestTest', array('path' => APP . 'plugins' . DS . 'TestTest' . DS ));
CakePlugin::load('TestTest', array('path' => APP . 'Plugin' . DS . 'TestTest' . DS ));
$this->Task->plugin = 'TestTest';
$result = $this->Task->testCaseFileName('Model', 'Post');
$expected = APP . 'plugins' . DS . 'TestTest' . DS . 'tests' . DS . 'Case' . DS . 'Model' . DS . 'PostTest.php';
$expected = APP . 'Plugin' . DS . 'TestTest' . DS . 'tests' . DS . 'Case' . DS . 'Model' . DS . 'PostTest.php';
$this->assertEqual($result, $expected);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Test/Case/Console/Command/Task/ViewTaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ public function testBakeWithPlugin() {
$this->Task->name = 'View';

//fake plugin path
CakePlugin::load('TestTest', array('path' => APP . 'plugins' . DS . 'TestTest' . DS));
$path = APP . 'plugins' . DS . 'TestTest' . DS . 'View' . DS . 'view_task_comments' . DS . 'view.ctp';
CakePlugin::load('TestTest', array('path' => APP . 'Plugin' . DS . 'TestTest' . DS));
$path = APP . 'Plugin' . DS . 'TestTest' . DS . 'View' . DS . 'view_task_comments' . DS . 'view.ctp';
$this->Task->expects($this->once())->method('createFile')
->with($path, new PHPUnit_Framework_Constraint_IsAnything());

Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Test/Case/Core/AppTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,11 @@ function testPluginPath() {
CakePlugin::loadAll();

$path = App::pluginPath('TestPlugin');
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'plugins' . DS . 'TestPlugin' . DS;
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS;
$this->assertEqual($path, $expected);

$path = App::pluginPath('TestPluginTwo');
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'plugins' . DS . 'TestPluginTwo' . DS;
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPluginTwo' . DS;
$this->assertEqual($path, $expected);
App::build();
}
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Test/Case/Core/CakePluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CakePluginTest extends CakeTestCase {
*/
public function setUp() {
App::build(array(
'plugins' => array(CAKE_TESTS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(CAKE_TESTS . 'test_app' . DS . 'Plugin' . DS)
), true);
}

Expand Down Expand Up @@ -177,10 +177,10 @@ public function testLoadNotFound() {
*/
public function testPath() {
CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
$expected = CAKE_TESTS . 'test_app' . DS . 'plugins' . DS . 'TestPlugin' . DS;
$expected = CAKE_TESTS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS;
$this->assertEquals(CakePlugin::path('TestPlugin'), $expected);

$expected = CAKE_TESTS . 'test_app' . DS . 'plugins' . DS . 'TestPluginTwo' . DS;
$expected = CAKE_TESTS . 'test_app' . DS . 'Plugin' . DS . 'TestPluginTwo' . DS;
$this->assertEquals(CakePlugin::path('TestPluginTwo'), $expected);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function setUp() {
$this->CakeEmail = new TestCakeEmail();

App::build(array(
'views' => array(CAKE . 'tests' . DS . 'test_app' . DS . 'View'. DS)
'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/TestSuite/HtmlCoverageReportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class HtmlCoverageReportTest extends CakeTestCase {
*/
public function setUp() {
App::build(array(
'plugins' => array(CAKE . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::loadAll();
$reporter = new CakeBaseReporter();
Expand Down

0 comments on commit 2a54f09

Please sign in to comment.