protected function FieldUpdateTest::assertEntityRefDependency in Drupal 8
Asserts that a config depends on 'entity_reference' or not
Parameters
\Drupal\Core\Config\Config $config: The config to test.
bool $present: TRUE to test that entity_reference is present, FALSE to test that it is absent.
1 call to FieldUpdateTest::assertEntityRefDependency()
- FieldUpdateTest::testFieldUpdate8002 in core/
modules/ field/ tests/ src/ Functional/ Update/ FieldUpdateTest.php - Tests field_update_8002().
File
- core/
modules/ field/ tests/ src/ Functional/ Update/ FieldUpdateTest.php, line 243
Class
- FieldUpdateTest
- Tests that field settings are properly updated during database updates.
Namespace
Drupal\Tests\field\Functional\UpdateCode
protected function assertEntityRefDependency(Config $config, $present) {
$dependencies = $config
->get('dependencies');
$dependencies += [
'module' => [],
];
$this
->assertEqual(in_array('entity_reference', $dependencies['module']), $present);
}