fix test for custom field helper

The test was requesting an entity not present in database
This commit is contained in:
Julien Fastré 2015-12-29 17:54:00 +01:00
parent 546fe49960
commit 8849d8bb54

View File

@ -52,11 +52,13 @@ class CustomFieldsHelperTest extends KernelTestCase
$this->cfHelper = $container->get('chill.custom_field.helper'); $this->cfHelper = $container->get('chill.custom_field.helper');
$cfieldsText = $container->get('doctrine.orm.entity_manager') $this->randomCFText = (new CustomField())
->getRepository('ChillCustomFieldsBundle:CustomField') ->setSlug('my-slug')
->findBy(array('type' => 'text')) ->setActive(true)
; ->setName(array('fr' => 'my cf'))
$this->randomCFText = end($cfieldsText); ->setOptions(array('maxLength' => 1000))
->setType('text')
;
} }
public function testRenderCustomField() public function testRenderCustomField()