protected function FieldUpdateTest::assertEntityRefDependency in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/field/src/Tests/Update/FieldUpdateTest.php \Drupal\field\Tests\Update\FieldUpdateTest::assertEntityRefDependency()
 
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/ src/ Tests/ Update/ FieldUpdateTest.php  - Tests field_update_8002().
 
File
- core/
modules/ field/ src/ Tests/ Update/ FieldUpdateTest.php, line 123  - Contains \Drupal\field\Tests\Update\FieldUpdateTest.
 
Class
- FieldUpdateTest
 - Tests that field settings are properly updated during database updates.
 
Namespace
Drupal\field\Tests\UpdateCode
protected function assertEntityRefDependency(Config $config, $present) {
  $dependencies = $config
    ->get('dependencies');
  $dependencies += [
    'module' => [],
  ];
  $this
    ->assertEqual(in_array('entity_reference', $dependencies['module']), $present);
}