mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
use constants for APP and CAKE
This commit is contained in:
parent
baf1ce93f2
commit
71ce18de8b
1 changed files with 8 additions and 20 deletions
|
@ -106,10 +106,10 @@ class TestShellTest extends CakeTestCase {
|
|||
public function testMapAppFileToCategory() {
|
||||
$this->Shell->startup();
|
||||
|
||||
$return = $this->Shell->mapFileToCategory('Controller/ExampleController.php');
|
||||
$return = $this->Shell->mapFileToCategory(APP . 'Controller/ExampleController.php');
|
||||
$this->assertSame('app', $return);
|
||||
|
||||
$return = $this->Shell->mapFileToCategory('My/File/Is/Here.php');
|
||||
$return = $this->Shell->mapFileToCategory(APP . 'My/File/Is/Here.php');
|
||||
$this->assertSame('app', $return);
|
||||
|
||||
}
|
||||
|
@ -122,10 +122,10 @@ class TestShellTest extends CakeTestCase {
|
|||
public function testMapAppFileToCase() {
|
||||
$this->Shell->startup();
|
||||
|
||||
$return = $this->Shell->mapFileToCase('Controller/ExampleController.php', 'app', false);
|
||||
$return = $this->Shell->mapFileToCase(APP . 'Controller/ExampleController.php', 'app', false);
|
||||
$this->assertSame('Controller/ExampleController', $return);
|
||||
|
||||
$return = $this->Shell->mapFileToCase('My/File/Is/Here.php', 'app', false);
|
||||
$return = $this->Shell->mapFileToCase(APP . 'My/File/Is/Here.php', 'app', false);
|
||||
$this->assertSame('My/File/Is/Here', $return);
|
||||
}
|
||||
|
||||
|
@ -137,16 +137,10 @@ class TestShellTest extends CakeTestCase {
|
|||
public function testMapPluginFileToCategory() {
|
||||
$this->Shell->startup();
|
||||
|
||||
$return = $this->Shell->mapFileToCategory('Plugins/Awesome/Controller/ExampleController.php');
|
||||
$return = $this->Shell->mapFileToCategory(APP . 'Plugin/awesome/Controller/ExampleController.php');
|
||||
$this->assertSame('awesome', $return);
|
||||
|
||||
$return = $this->Shell->mapFileToCategory('plugins/Awesome/Controller/ExampleController.php');
|
||||
$this->assertSame('awesome', $return);
|
||||
|
||||
$return = $this->Shell->mapFileToCategory('app/Plugins/Awesome/Controller/ExampleController.php');
|
||||
$this->assertSame('awesome', $return);
|
||||
|
||||
$return = $this->Shell->mapFileToCategory('app/plugins/Awesome/Controller/ExampleController.php');
|
||||
$return = $this->Shell->mapFileToCategory(dirname(CAKE) . 'plugins/awesome/Controller/ExampleController.php');
|
||||
$this->assertSame('awesome', $return);
|
||||
|
||||
}
|
||||
|
@ -159,16 +153,10 @@ class TestShellTest extends CakeTestCase {
|
|||
public function testMapPluginFileToCase() {
|
||||
$this->Shell->startup();
|
||||
|
||||
$return = $this->Shell->mapFileToCase('Plugins/Awesome/Controller/ExampleController.php', 'awesome', false);
|
||||
$return = $this->Shell->mapFileToCase(APP . 'Plugin/awesome/Controller/ExampleController.php', 'awesome', false);
|
||||
$this->assertSame('Controller/ExampleController', $return);
|
||||
|
||||
$return = $this->Shell->mapFileToCase('plugins/Awesome/Controller/ExampleController.php', 'awesome', false);
|
||||
$this->assertSame('Controller/ExampleController', $return);
|
||||
|
||||
$return = $this->Shell->mapFileToCase('app/Plugins/Awesome/Controller/ExampleController.php', 'awesome', false);
|
||||
$this->assertSame('Controller/ExampleController', $return);
|
||||
|
||||
$return = $this->Shell->mapFileToCase('app/plugins/Awesome/Controller/ExampleController.php', 'awesome', false);
|
||||
$return = $this->Shell->mapFileToCase(dirname(CAKE) . 'plugins/awesome/Controller/ExampleController.php', 'awesome', false);
|
||||
$this->assertSame('Controller/ExampleController', $return);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue