mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
consistency in twig methods
The method chill_custom_fields_is_empty take now the fields as first argument, and the customField as second argument, to be consistent with other twig methods.
This commit is contained in:
@@ -102,4 +102,27 @@ class CustomFieldRenderingTwigTest extends KernelTestCase
|
||||
$this->assertContains('My tailor is rich', $text,
|
||||
"The rendering text should contains the 'test' text");
|
||||
}
|
||||
|
||||
public function testIsEmpty()
|
||||
{
|
||||
$cf = $this->getSimpleCustomFieldText();
|
||||
|
||||
// value is not empty
|
||||
$fields = array(
|
||||
'test' => "My tailor is rich"
|
||||
);
|
||||
|
||||
$result = $this->cfRendering->isEmptyValue($fields, $cf);
|
||||
|
||||
$this->assertFalse($result);
|
||||
|
||||
// value is empty
|
||||
$fields = array(
|
||||
'text' => ''
|
||||
);
|
||||
|
||||
$result = $this->cfRendering->isEmptyValue($fields, $cf);
|
||||
|
||||
$this->assertTrue($result);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user