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');
$cfieldsText = $container->get('doctrine.orm.entity_manager')
->getRepository('ChillCustomFieldsBundle:CustomField')
->findBy(array('type' => 'text'))
;
$this->randomCFText = end($cfieldsText);
$this->randomCFText = (new CustomField())
->setSlug('my-slug')
->setActive(true)
->setName(array('fr' => 'my cf'))
->setOptions(array('maxLength' => 1000))
->setType('text')
;
}
public function testRenderCustomField()