Skip to content
Browse files

[Form] fixed unit test

  • Loading branch information...
1 parent 2ee0c28 commit 644891210997b9e59bb3a1dde8bac89f8f145767 @fabpot fabpot committed Jun 9, 2011
Showing with 6 additions and 2 deletions.
  1. +6 −2 tests/Symfony/Tests/Component/Form/FormBuilderTest.php
View
8 tests/Symfony/Tests/Component/Form/FormBuilderTest.php
@@ -97,8 +97,12 @@ public function testRemoveUnknown()
public function testCreateNoTypeNoDataClass()
{
- $this->setExpectedException('Symfony\Component\Form\Exception\FormException', 'The data class must be set to automatically create children');
- $this->builder->create('foo');
+ $this->factory->expects($this->once())
+ ->method('createNamedBuilder')
+ ->with('text', 'foo', null, array())
+ ;
+
+ $builder = $this->builder->create('foo');
}
public function testGetUnknown()

0 comments on commit 6448912

Please sign in to comment.
Something went wrong with that request. Please try again.