You are here

protected function TestBase::getFieldContentType in Select (or other) 4.x

Same name and namespace in other branches
  1. 8 tests/src/Functional/TestBase.php \Drupal\Tests\select_or_other\Functional\TestBase::getFieldContentType()

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

Parameters

string $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.

3 calls to TestBase::getFieldContentType()
ListTest::testIllegalChoice in tests/src/Functional/ListTest.php
Test for illegal choice.
TestBase::setFieldValue in tests/src/Functional/TestBase.php
Submit the add node form with the selected values.
TestBase::testEmptyOption in tests/src/Functional/TestBase.php
Make sure an empty option is present when relevant.

File

tests/src/Functional/TestBase.php, line 236

Class

TestBase
Base test class for select or other widgets.

Namespace

Drupal\Tests\select_or_other\Functional

Code

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