mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
More string replacing for new paths
This commit is contained in:
parent
649b863fc5
commit
2a54f0923d
11 changed files with 22 additions and 22 deletions
|
@ -41,7 +41,7 @@ class PluginTask extends Shell {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function initialize() {
|
function initialize() {
|
||||||
$this->path = APP . 'plugins' . DS;
|
$this->path = APP . 'Plugin' . DS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -458,7 +458,7 @@ class SchemaShellTest extends CakeTestCase {
|
||||||
'connection' => 'test'
|
'connection' => 'test'
|
||||||
);
|
);
|
||||||
$this->Shell->startup();
|
$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);
|
$this->assertEqual($this->Shell->Schema->path, $expected);
|
||||||
CakePlugin::unload();
|
CakePlugin::unload();
|
||||||
}
|
}
|
||||||
|
|
|
@ -301,8 +301,8 @@ class ControllerTaskTest extends CakeTestCase {
|
||||||
$uses = array('Comment', 'User');
|
$uses = array('Comment', 'User');
|
||||||
|
|
||||||
//fake plugin path
|
//fake plugin path
|
||||||
CakePlugin::load('ControllerTest', array('path' => APP . 'plugins' . DS . 'ControllerTest' . DS));
|
CakePlugin::load('ControllerTest', array('path' => APP . 'Plugin' . DS . 'ControllerTest' . DS));
|
||||||
$path = APP . 'plugins' . DS . 'ControllerTest' . DS . 'Controller' . DS . 'ArticlesController.php';
|
$path = APP . 'Plugin' . DS . 'ControllerTest' . DS . 'Controller' . DS . 'ArticlesController.php';
|
||||||
|
|
||||||
$this->Task->expects($this->at(1))->method('createFile')->with(
|
$this->Task->expects($this->at(1))->method('createFile')->with(
|
||||||
$path,
|
$path,
|
||||||
|
@ -316,7 +316,7 @@ class ControllerTaskTest extends CakeTestCase {
|
||||||
$this->Task->bake('Articles', '--actions--', array(), array(), array());
|
$this->Task->bake('Articles', '--actions--', array(), array(), array());
|
||||||
|
|
||||||
$this->Task->plugin = 'ControllerTest';
|
$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->Task->bake('Articles', '--actions--', array(), array(), array());
|
||||||
|
|
||||||
$this->assertEqual($this->Task->Template->templateVars['plugin'], 'ControllerTest');
|
$this->assertEqual($this->Task->Template->templateVars['plugin'], 'ControllerTest');
|
||||||
|
|
|
@ -362,10 +362,10 @@ class FixtureTaskTest extends CakeTestCase {
|
||||||
$this->Task->connection = 'test';
|
$this->Task->connection = 'test';
|
||||||
$this->Task->path = '/my/path/';
|
$this->Task->path = '/my/path/';
|
||||||
$this->Task->plugin = 'TestFixture';
|
$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
|
//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')
|
$this->Task->expects($this->at(0))->method('createFile')
|
||||||
->with($filename, new PHPUnit_Framework_Constraint_PCREMatch('/Article/'));
|
->with($filename, new PHPUnit_Framework_Constraint_PCREMatch('/Article/'));
|
||||||
|
|
||||||
|
|
|
@ -746,8 +746,8 @@ STRINGEND;
|
||||||
$this->Task->plugin = 'ControllerTest';
|
$this->Task->plugin = 'ControllerTest';
|
||||||
|
|
||||||
//fake plugin path
|
//fake plugin path
|
||||||
CakePlugin::load('ControllerTest', array('path' => APP . 'plugins' . DS . 'ControllerTest' . DS));
|
CakePlugin::load('ControllerTest', array('path' => APP . 'Plugin' . DS . 'ControllerTest' . DS));
|
||||||
$path = APP . 'plugins' . DS . 'ControllerTest' . DS . 'Model' . DS . 'BakeArticle.php';
|
$path = APP . 'Plugin' . DS . 'ControllerTest' . DS . 'Model' . DS . 'BakeArticle.php';
|
||||||
$this->Task->expects($this->once())->method('createFile')
|
$this->Task->expects($this->once())->method('createFile')
|
||||||
->with($path, new PHPUnit_Framework_Constraint_PCREMatch('/BakeArticle extends ControllerTestAppModel/'));
|
->with($path, new PHPUnit_Framework_Constraint_PCREMatch('/BakeArticle extends ControllerTestAppModel/'));
|
||||||
|
|
||||||
|
|
|
@ -527,8 +527,8 @@ class TestTaskTest extends CakeTestCase {
|
||||||
$this->Task->plugin = 'TestTest';
|
$this->Task->plugin = 'TestTest';
|
||||||
|
|
||||||
//fake plugin path
|
//fake plugin path
|
||||||
CakePlugin::load('TestTest', array('path' => APP . 'plugins' . DS . 'TestTest' . DS));
|
CakePlugin::load('TestTest', array('path' => APP . 'Plugin' . DS . 'TestTest' . DS));
|
||||||
$path = APP . 'plugins' . DS . 'TestTest' . DS . 'tests' . DS . 'Case' . DS . 'View' . DS . 'Helper' . DS .'FormHelperTest.php';
|
$path = APP . 'Plugin' . DS . 'TestTest' . DS . 'tests' . DS . 'Case' . DS . 'View' . DS . 'Helper' . DS .'FormHelperTest.php';
|
||||||
$this->Task->expects($this->once())->method('createFile')
|
$this->Task->expects($this->once())->method('createFile')
|
||||||
->with($path, new PHPUnit_Framework_Constraint_IsAnything());
|
->with($path, new PHPUnit_Framework_Constraint_IsAnything());
|
||||||
|
|
||||||
|
@ -596,10 +596,10 @@ class TestTaskTest extends CakeTestCase {
|
||||||
$expected = $this->Task->path . 'Case' . DS . 'Controller' . DS . 'Component' . DS . 'AuthComponentTest.php';
|
$expected = $this->Task->path . 'Case' . DS . 'Controller' . DS . 'Component' . DS . 'AuthComponentTest.php';
|
||||||
$this->assertEqual($result, $expected);
|
$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';
|
$this->Task->plugin = 'TestTest';
|
||||||
$result = $this->Task->testCaseFileName('Model', 'Post');
|
$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);
|
$this->assertEqual($result, $expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -396,8 +396,8 @@ class ViewTaskTest extends CakeTestCase {
|
||||||
$this->Task->name = 'View';
|
$this->Task->name = 'View';
|
||||||
|
|
||||||
//fake plugin path
|
//fake plugin path
|
||||||
CakePlugin::load('TestTest', array('path' => APP . 'plugins' . DS . 'TestTest' . DS));
|
CakePlugin::load('TestTest', array('path' => APP . 'Plugin' . DS . 'TestTest' . DS));
|
||||||
$path = APP . 'plugins' . DS . 'TestTest' . DS . 'View' . DS . 'view_task_comments' . DS . 'view.ctp';
|
$path = APP . 'Plugin' . DS . 'TestTest' . DS . 'View' . DS . 'view_task_comments' . DS . 'view.ctp';
|
||||||
$this->Task->expects($this->once())->method('createFile')
|
$this->Task->expects($this->once())->method('createFile')
|
||||||
->with($path, new PHPUnit_Framework_Constraint_IsAnything());
|
->with($path, new PHPUnit_Framework_Constraint_IsAnything());
|
||||||
|
|
||||||
|
|
|
@ -374,11 +374,11 @@ class AppImportTest extends CakeTestCase {
|
||||||
CakePlugin::loadAll();
|
CakePlugin::loadAll();
|
||||||
|
|
||||||
$path = App::pluginPath('TestPlugin');
|
$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);
|
$this->assertEqual($path, $expected);
|
||||||
|
|
||||||
$path = App::pluginPath('TestPluginTwo');
|
$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);
|
$this->assertEqual($path, $expected);
|
||||||
App::build();
|
App::build();
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ class CakePluginTest extends CakeTestCase {
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'plugins' => array(CAKE_TESTS . 'test_app' . DS . 'plugins' . DS)
|
'plugins' => array(CAKE_TESTS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
), true);
|
), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,10 +177,10 @@ class CakePluginTest extends CakeTestCase {
|
||||||
*/
|
*/
|
||||||
public function testPath() {
|
public function testPath() {
|
||||||
CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
|
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);
|
$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);
|
$this->assertEquals(CakePlugin::path('TestPluginTwo'), $expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ class CakeEmailTest extends CakeTestCase {
|
||||||
$this->CakeEmail = new TestCakeEmail();
|
$this->CakeEmail = new TestCakeEmail();
|
||||||
|
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'views' => array(CAKE . 'tests' . DS . 'test_app' . DS . 'View'. DS)
|
'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class HtmlCoverageReportTest extends CakeTestCase {
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
App::build(array(
|
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();
|
CakePlugin::loadAll();
|
||||||
$reporter = new CakeBaseReporter();
|
$reporter = new CakeBaseReporter();
|
||||||
|
|
Loading…
Reference in a new issue