From 758b474e561a2b2456fab8d8926147bbabf66144 Mon Sep 17 00:00:00 2001 From: Shota Hoshino Date: Wed, 17 Feb 2016 22:02:33 +0900 Subject: [PATCH] Fix form type tests --- tests/Form/Form/Base64EncodedFileTypeTest.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/Form/Form/Base64EncodedFileTypeTest.php b/tests/Form/Form/Base64EncodedFileTypeTest.php index 86f0498..f6f3742 100644 --- a/tests/Form/Form/Base64EncodedFileTypeTest.php +++ b/tests/Form/Form/Base64EncodedFileTypeTest.php @@ -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); } }