mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
add a plugin parsing test
This commit is contained in:
parent
4addd9faae
commit
baf1ce93f2
1 changed files with 43 additions and 0 deletions
|
@ -129,6 +129,49 @@ class TestShellTest extends CakeTestCase {
|
|||
$this->assertSame('My/File/Is/Here', $return);
|
||||
}
|
||||
|
||||
/**
|
||||
* testMapPluginFileToCategory
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testMapPluginFileToCategory() {
|
||||
$this->Shell->startup();
|
||||
|
||||
$return = $this->Shell->mapFileToCategory('Plugins/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');
|
||||
$this->assertSame('awesome', $return);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* testMapPluginFileToCase
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testMapPluginFileToCase() {
|
||||
$this->Shell->startup();
|
||||
|
||||
$return = $this->Shell->mapFileToCase('Plugins/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);
|
||||
$this->assertSame('Controller/ExampleController', $return);
|
||||
}
|
||||
|
||||
/**
|
||||
* test available list of test cases for an empty category
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue