mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixing controller test file generation
This commit is contained in:
parent
518c318887
commit
79568cc742
2 changed files with 6 additions and 3 deletions
|
@ -159,7 +159,7 @@ class TestTask extends Shell {
|
|||
if (strpos($this->path, $type) === false) {
|
||||
$this->filePath = $this->path . 'cases' . DS . Inflector::tableize($type) . DS;
|
||||
}
|
||||
$made = $this->createFile($this->filePath . Inflector::underscore($className) . '.test.php', $out);
|
||||
$made = $this->createFile($this->filePath . Inflector::underscore($fullClassName) . '.test.php', $out);
|
||||
if ($made) {
|
||||
return $out;
|
||||
}
|
||||
|
|
|
@ -161,13 +161,16 @@ class TestTaskTest extends CakeTestCase {
|
|||
$this->Task->Dispatch->expectNever('stderr');
|
||||
$this->Task->Dispatch->expectNever('_stop');
|
||||
|
||||
$this->Task->setReturnValueAt(0, 'in', 'y');
|
||||
$this->Task->setReturnValue('in', 'y');
|
||||
$this->Task->expectAt(0, 'createFile', array($file, '*'));
|
||||
$this->Task->bake('Model', 'MyClass');
|
||||
|
||||
$this->Task->setReturnValueAt(1, 'in', 'y');
|
||||
$this->Task->expectAt(1, 'createFile', array($file, '*'));
|
||||
$this->Task->bake('Model', 'MyClass');
|
||||
|
||||
$file = TESTS . 'cases' . DS . 'controllers' . DS . 'comments_controller.test.php';
|
||||
$this->Task->expectAt(2, 'createFile', array($file, '*'));
|
||||
$this->Task->bake('Controller', 'Comments');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue