public function FieldHelperTestCase::testGetFieldsByType in Helper 7
File
- tests/
FieldHelperTestCase.test, line 123
Class
Code
public function testGetFieldsByType() {
$this
->assertIdentical(FieldHelper::getFieldsByType('invalid'), array());
$this
->assertIdentical(FieldHelper::getFieldsByType('file'), array(
'field_file',
));
$this
->assertIdentical(FieldHelper::getFieldsByType('image'), array(
'field_image',
));
$this
->assertIdentical(FieldHelper::getFieldsByType('entityreference'), array(
'field_entity_node',
'field_entity_taxonomy',
));
field_delete_field('field_entity_taxonomy');
$this
->assertIdentical(FieldHelper::getFieldsByType('entityreference'), array(
'field_entity_node',
));
}