mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-20 09:14:23 +00:00
Tests/CustomFields/CustomFieldsTextTest.php : refactoring
This commit is contained in:
parent
0e5e87eb41
commit
b11a356fd3
@ -45,12 +45,8 @@ class CustomFieldsTextTest extends WebTestCase
|
||||
static::bootKernel();
|
||||
$this->customFieldProvider = static::$kernel->getContainer()
|
||||
->get('chill.custom_field.provider');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function testCustomFieldsTextExists()
|
||||
{
|
||||
$customField = $this->customFieldProvider->getCustomFieldByType('text');
|
||||
@ -69,15 +65,12 @@ class CustomFieldsTextTest extends WebTestCase
|
||||
->setSlug('slug')
|
||||
->setOrdering(10)
|
||||
->setActive(true)
|
||||
->setName(array('en' => 'my label'))
|
||||
;
|
||||
->setName(array('en' => 'my label'));
|
||||
|
||||
$crawler = CustomFieldTestHelper::getCrawlerForField($customField, $this, static::$kernel);
|
||||
|
||||
$this->assertCount(1, $crawler->filter("input[type=text]"));
|
||||
$this->assertCount(1, $crawler->filter("label:contains('my label')"));
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function testPublicFormRenderingLengthMoreThan25()
|
||||
@ -88,8 +81,7 @@ class CustomFieldsTextTest extends WebTestCase
|
||||
->setSlug('slug')
|
||||
->setOrdering(10)
|
||||
->setActive(true)
|
||||
->setName(array('en' => 'my label'))
|
||||
;
|
||||
->setName(array('en' => 'my label'));
|
||||
|
||||
$crawler = CustomFieldTestHelper::getCrawlerForField($customField, $this, static::$kernel);
|
||||
|
||||
@ -108,5 +100,4 @@ class CustomFieldsTextTest extends WebTestCase
|
||||
$form = $crawler->selectButton('custom_field_choice_submit')->form();
|
||||
$this->assertTrue($form->has('custom_field_choice[options][maxLength]'));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user