mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
parent
5e5293a866
commit
d810b43e80
2 changed files with 13 additions and 1 deletions
|
@ -373,7 +373,7 @@ class ControllerTask extends Shell {
|
|||
$propertyListTrimmed = str_replace(' ', '', $propertyList);
|
||||
$property = explode(',', $propertyListTrimmed);
|
||||
}
|
||||
return $property;
|
||||
return array_filter($property);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -181,6 +181,12 @@ class ControllerTaskTest extends CakeTestCase {
|
|||
$result = $this->Task->doHelpers();
|
||||
$expected = array('Javascript', 'Ajax', 'CustomOne');
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$this->Task->setReturnValueAt(3, 'in', 'y');
|
||||
$this->Task->setReturnValueAt(4, 'in', ' Javascript, Ajax, CustomOne, , ');
|
||||
$result = $this->Task->doHelpers();
|
||||
$expected = array('Javascript', 'Ajax', 'CustomOne');
|
||||
$this->assertEqual($result, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -198,6 +204,12 @@ class ControllerTaskTest extends CakeTestCase {
|
|||
$result = $this->Task->doComponents();
|
||||
$expected = array('RequestHandler', 'Security');
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$this->Task->setReturnValueAt(3, 'in', 'y');
|
||||
$this->Task->setReturnValueAt(4, 'in', ' RequestHandler, Security, , ');
|
||||
$result = $this->Task->doComponents();
|
||||
$expected = array('RequestHandler', 'Security');
|
||||
$this->assertEqual($result, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue