You are here

protected function SelectOrOtherTestBase::getFieldContentType in Select (or other) 7.3

Returns the machine name of the content type a field is configured on.

Parameters

$field_name: The field machine name of which to retrieve the content type.

Return value

string|null The content type machine name or NULL if not found.

4 calls to SelectOrOtherTestBase::getFieldContentType()
SelectOrOtherTestBase::selectAllOptions in tests/SelectOrOtherTestBase.test
Submit the add node form with all options selected for the specified field.
SelectOrOtherTestBase::setFieldValue in tests/SelectOrOtherTestBase.test
Submit the add node form with the selected values.
SelectOrOtherTestBase::testEmptyOption in tests/SelectOrOtherTestBase.test
Make sure an empty option is present when relevant.
SelectOrOtherTestBase::testFieldLabelVisibleOnce in tests/SelectOrOtherTestBase.test
Make sure the field label is visible only once.

File

tests/SelectOrOtherTestBase.test, line 320
Contains SelectOrOtherTestBase.

Class

SelectOrOtherTestBase
Class SelectOrOtherTestBase Base class for select_or_other testing.

Code

protected function getFieldContentType($field_name) {
  return $this->fields[$field_name]['content_type']->name;
}