mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
parent
e6ef218600
commit
35bf3097cd
2 changed files with 3 additions and 0 deletions
|
@ -479,6 +479,7 @@ class TestTask extends BakeTask {
|
|||
*/
|
||||
public function generateUses($type, $realType, $className) {
|
||||
$uses = array();
|
||||
$type = strtolower($type);
|
||||
if ($type == 'component') {
|
||||
$uses[] = array('ComponentCollection', 'Controller');
|
||||
$uses[] = array('Component', 'Controller');
|
||||
|
|
|
@ -491,6 +491,8 @@ class TestTaskTest extends CakeTestCase {
|
|||
|
||||
$result = $this->Task->bake('Component', 'Example');
|
||||
|
||||
$this->assertContains("App::uses('Component', 'Controller')", $result);
|
||||
$this->assertContains("App::uses('ComponentCollection', 'Controller')", $result);
|
||||
$this->assertContains("App::uses('ExampleComponent', 'Controller/Component')", $result);
|
||||
$this->assertContains('class ExampleComponentTest extends CakeTestCase', $result);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue