1 entityreference.admin.test | protected EntityReferenceAdminTestCase::assertFieldSelectOptions($name, $expected_options) |
File
- core/
modules/ entityreference/ tests/ entityreference.admin.test, line 31 - Contains EntityReferenceHandlersTestCase
Class
- EntityReferenceAdminTestCase
- Test for Entity Reference admin UI.
Code
protected function assertFieldSelectOptions($name, $expected_options) {
$xpath = $this->buildXPathQuery('//select[@name=:name]', array(':name' => $name));
$fields = $this->xpath($xpath);
if ($fields) {
$field = $fields[0];
$options = $this->getAllOptionsList($field);
return $this->assertIdentical($options, $expected_options);
}
else {
return $this->fail(t('Unable to find field @name', array('@name' => $name)));
}
}