8000 [Form] fixed unit test · 77web/symfony@6448912 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 6448912

Browse files
committed
[Form] fixed unit test
1 parent 2ee0c28 commit 6448912

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/Symfony/Tests/Component/Form/FormBuilderTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,12 @@ public function testRemoveUnknown()
9797

9898
public function testCreateNoTypeNoDataClass()
9999
{
100-
$this->setExpectedException('Symfony\Component\Form\Exception\FormException', 'The data class must be set to automatically create children');
101-
$this->builder->create('foo');
100+
$this->factory->expects($this->once())
101+
->method('createNamedBuilder')
102+
->with('text', 'foo', null, array())
103+
;
104+
105+
$builder = $this->builder->create('foo');
102106
}
103107

104108
public function testGetUnknown()

0 commit comments

Comments
 (0)
0