[Form] Disabled manual singulars in PropertyPath until the syntax is finalized
This commit is contained in:
parent
1be155ab8c
commit
dd2aa54e15
@ -211,6 +211,8 @@ abstract class PropertyPathCollectionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testSetValueCallsCustomAdderAndRemover()
|
public function testSetValueCallsCustomAdderAndRemover()
|
||||||
{
|
{
|
||||||
|
$this->markTestSkipped('This feature is temporarily disabled as of 2.1');
|
||||||
|
|
||||||
$car = $this->getMock(__CLASS__ . '_CarCustomSingular');
|
$car = $this->getMock(__CLASS__ . '_CarCustomSingular');
|
||||||
$axesBefore = $this->getCollection(array(1 => 'second', 3 => 'fourth'));
|
$axesBefore = $this->getCollection(array(1 => 'second', 3 => 'fourth'));
|
||||||
$axesAfter = $this->getCollection(array(0 => 'first', 1 => 'second', 2 => 'third'));
|
$axesAfter = $this->getCollection(array(0 => 'first', 1 => 'second', 2 => 'third'));
|
||||||
@ -300,6 +302,9 @@ abstract class PropertyPathCollectionTest extends \PHPUnit_Framework_TestCase
|
|||||||
);
|
);
|
||||||
$data[] = array($car, $propertyPath, $expectedMessage);
|
$data[] = array($car, $propertyPath, $expectedMessage);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Temporarily disabled in 2.1
|
||||||
|
|
||||||
$propertyPath = new PropertyPath('axes|boo');
|
$propertyPath = new PropertyPath('axes|boo');
|
||||||
$expectedMessage = sprintf(
|
$expectedMessage = sprintf(
|
||||||
'Neither element "axes" nor method "setAxes()" exists in class '
|
'Neither element "axes" nor method "setAxes()" exists in class '
|
||||||
@ -309,6 +314,7 @@ abstract class PropertyPathCollectionTest extends \PHPUnit_Framework_TestCase
|
|||||||
'boo'
|
'boo'
|
||||||
);
|
);
|
||||||
$data[] = array($car, $propertyPath, $expectedMessage);
|
$data[] = array($car, $propertyPath, $expectedMessage);
|
||||||
|
*/
|
||||||
|
|
||||||
$car = $this->getMock(__CLASS__ . '_CarNoAdderAndRemoverWithProperty');
|
$car = $this->getMock(__CLASS__ . '_CarNoAdderAndRemoverWithProperty');
|
||||||
$propertyPath = new PropertyPath('axes');
|
$propertyPath = new PropertyPath('axes');
|
||||||
|
@ -95,6 +95,8 @@ class PropertyPathTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testGetValueIgnoresSingular()
|
public function testGetValueIgnoresSingular()
|
||||||
{
|
{
|
||||||
|
$this->markTestSkipped('This feature is temporarily disabled as of 2.1');
|
||||||
|
|
||||||
$object = (object) array('children' => 'Many');
|
$object = (object) array('children' => 'Many');
|
||||||
|
|
||||||
$path = new PropertyPath('children|child');
|
$path = new PropertyPath('children|child');
|
||||||
|
@ -118,8 +118,9 @@ class PropertyPath implements \IteratorAggregate, PropertyPathInterface
|
|||||||
$element = $matches[3];
|
$element = $matches[3];
|
||||||
$this->isIndex[] = true;
|
$this->isIndex[] = true;
|
||||||
}
|
}
|
||||||
|
// Disabled this behaviour as the syntax is not yet final
|
||||||
$pos = strpos($element, self::SINGULAR_SEPARATOR);
|
//$pos = strpos($element, self::SINGULAR_SEPARATOR);
|
||||||
|
$pos = false;
|
||||||
$singular = null;
|
$singular = null;
|
||||||
|
|
||||||
if (false !== $pos) {
|
if (false !== $pos) {
|
||||||
|
Reference in New Issue
Block a user