Skip to content

Commit

Permalink
Fix form type tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hshn committed Feb 17, 2016
1 parent 5ab0ea4 commit 758b474
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/Form/Form/Base64EncodedFileTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ public function testEmpty()
*/
private function createForm()
{
return $this->factory->create(new Base64EncodedFileType());
$type = new Base64EncodedFileType();

$name = $type->getParent() === 'text'
// sf < 2.7
? $type
// sf > 2.8
: 'Hshn\Base64EncodedFile\Form\Type\Base64EncodedFileType';

return $this->factory->create($name);
}
}

0 comments on commit 758b474

Please sign in to comment.