mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixing test that failed when no models were found in app.
This commit is contained in:
parent
ddc341e4de
commit
0eef6577e2
1 changed files with 5 additions and 0 deletions
|
@ -258,6 +258,11 @@ class TestTaskTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
**/
|
**/
|
||||||
function testGetClassName() {
|
function testGetClassName() {
|
||||||
|
$objects = Configure::listObjects('model');
|
||||||
|
$skip = $this->skipIf(empty($objects), 'No models in app, this test will fail. %s');
|
||||||
|
if ($skip) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$this->Task->setReturnValueAt(0, 'in', 'MyCustomClass');
|
$this->Task->setReturnValueAt(0, 'in', 'MyCustomClass');
|
||||||
$result = $this->Task->getClassName('Model');
|
$result = $this->Task->getClassName('Model');
|
||||||
$this->assertEqual($result, 'MyCustomClass');
|
$this->assertEqual($result, 'MyCustomClass');
|
||||||
|
|
Loading…
Add table
Reference in a new issue