Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ public function testSetValueCallsAdderAndRemoverForNestedCollections()

public function testSetValueCallsCustomAdderAndRemover()
{
$this->markTestSkipped('This feature is temporarily disabled as of 2.1');

$car = $this->getMock(__CLASS__ . '_CarCustomSingular');
$axesBefore = $this->getCollection(array(1 => 'second', 3 => 'fourth'));
$axesAfter = $this->getCollection(array(0 => 'first', 1 => 'second', 2 => 'third'));
Expand Down Expand Up @@ -300,6 +302,9 @@ public function noAdderRemoverData()
);
$data[] = array($car, $propertyPath, $expectedMessage);

/*
Temporarily disabled in 2.1

$propertyPath = new PropertyPath('axes|boo');
$expectedMessage = sprintf(
'Neither element "axes" nor method "setAxes()" exists in class '
Expand All @@ -309,6 +314,7 @@ public function noAdderRemoverData()
'boo'
);
$data[] = array($car, $propertyPath, $expectedMessage);
*/

$car = $this->getMock(__CLASS__ . '_CarNoAdderAndRemoverWithProperty');
$propertyPath = new PropertyPath('axes');
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Form/Tests/Util/PropertyPathTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ public function testGetValueReadsProperty()

public function testGetValueIgnoresSingular()
{
$this->markTestSkipped('This feature is temporarily disabled as of 2.1');

$object = (object) array('children' => 'Many');

$path = new PropertyPath('children|child');
Expand Down
5 changes: 3 additions & 2 deletions src/Symfony/Component/Form/Util/PropertyPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ public function __construct($propertyPath)
$element = $matches[3];
$this->isIndex[] = true;
}

$pos = strpos($element, self::SINGULAR_SEPARATOR);
// Disabled this behaviour as the syntax is not yet final
//$pos = strpos($element, self::SINGULAR_SEPARATOR);
$pos = false;
$singular = null;

if (false !== $pos) {
Expand Down