Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bda264b

Browse filesBrowse files
Brandon Turnerfabpot
Brandon Turner
authored andcommitted
[Form] Removed invalid unit test
The bind() method only accepts arrays - passing objects causes an exception
1 parent 7072054 commit bda264b
Copy full SHA for bda264b

File tree

Expand file treeCollapse file tree

1 file changed

+0
-21
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-21
lines changed

‎tests/Symfony/Tests/Component/Form/CollectionFieldTest.php

Copy file name to clipboardExpand all lines: tests/Symfony/Tests/Component/Form/CollectionFieldTest.php
-21Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -122,25 +122,4 @@ public function testResizedIfBoundWithExtraDataAndModifiable()
122122
$this->assertEquals('foo@foo.com', $field[0]->getData());
123123
$this->assertEquals('bar@bar.com', $field[1]->getData());
124124
}
125-
126-
public function testCollectionOfFieldGroupsBoundWithArrayObjectContainingObjects()
127-
{
128-
$fieldGroup = new FieldGroup('name');
129-
$fieldGroup->add(new TestField('first'));
130-
$fieldGroup->add(new TestField('last'));
131-
132-
$field = new CollectionField($fieldGroup);
133-
134-
$nameData = (object) array('first' => 'Foo', 'last' => 'Bar');
135-
$collectionData = new \ArrayObject(array($nameData));
136-
$field->setData($collectionData);
137-
138-
$boundNameData = (object) array('first' => 'Foo', 'last' => 'Baz');
139-
$boundCollectionData = new \ArrayObject(array($boundNameData));
140-
$field->bind($boundCollectionData);
141-
142-
$this->assertTrue($field->has('0'));
143-
$this->assertFalse($field->has('1'));
144-
$this->assertEquals($boundNameData, $field[0]->getData());
145-
}
146125
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.