Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
a86440390c
@ -56,12 +56,9 @@ abstract class OptionsPropertyGroup extends OptionsPropertyItem
|
||||
*/
|
||||
public function removeProperty($property)
|
||||
{
|
||||
$this->_properties = array_udiff(
|
||||
$this->_properties = array_diff(
|
||||
$this->getProperties(),
|
||||
array($property),
|
||||
function ($a, $b) {
|
||||
return ($a === $b ) ? 0 : 1;
|
||||
}
|
||||
array($property)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -71,15 +71,6 @@ class PMA_OptionsPropertyGroup_Test extends PHPUnit_Framework_TestCase
|
||||
$properties = new \ReflectionProperty('OptionsPropertyGroup', '_properties');
|
||||
$properties->setAccessible(true);
|
||||
|
||||
$properties->setValue($this->stub, array(1, 2, 3, 'test'));
|
||||
|
||||
$this->stub->removeProperty('test');
|
||||
|
||||
$this->assertEquals(
|
||||
array(1, 2, 3, 'test'),
|
||||
$properties->getValue($this->stub)
|
||||
);
|
||||
|
||||
$properties->setValue($this->stub, array(1, 2, 'test', 3));
|
||||
$this->stub->removeProperty('test');
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user