namespace Drupal\Tests\field_ui\Kernel;
use Drupal\Component\Render\FormattableMarkup;
-use Drupal\Component\Utility\Unicode;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Database\Database;
use Drupal\Core\Entity\Display\EntityDisplayInterface;
'link_to_entity' => FALSE,
],
'third_party_settings' => [],
- 'region' => 'content'
+ 'region' => 'content',
];
$this->assertEqual($display->getComponents(), $expected);
// Check that the default visibility taken into account for extra fields
// unknown in the display.
- $this->assertEqual($display->getComponent('display_extra_field'), ['weight' => 5, 'region' => 'content']);
+ $this->assertEqual(
+ $display->getComponent('display_extra_field'),
+ [
+ 'weight' => 5,
+ 'region' => 'content',
+ 'settings' => [],
+ 'third_party_settings' => [],
+ ]
+ );
$this->assertNull($display->getComponent('display_extra_field_hidden'));
// Check that setting explicit options overrides the defaults.
$field_storage = FieldStorageConfig::create([
'field_name' => $field_name,
'entity_type' => 'entity_test',
- 'type' => 'test_field'
+ 'type' => 'test_field',
]);
$field_storage->save();
$field = FieldConfig::create([
$field_storage = FieldStorageConfig::create([
'field_name' => $field_name,
'entity_type' => 'entity_test',
- 'type' => 'test_field'
+ 'type' => 'test_field',
]);
$field_storage->save();
$field = FieldConfig::create([
$field_storage = FieldStorageConfig::create([
'field_name' => $field_name,
'entity_type' => 'entity_test',
- 'type' => 'text'
+ 'type' => 'text',
]);
$field_storage->save();
$field = FieldConfig::create([
// Create two arbitrary user roles.
for ($i = 0; $i < 2; $i++) {
$roles[$i] = Role::create([
- 'id' => Unicode::strtolower($this->randomMachineName()),
+ 'id' => mb_strtolower($this->randomMachineName()),
'label' => $this->randomString(),
]);
$roles[$i]->save();
}
// Create a field of type 'test_field' attached to 'entity_test'.
- $field_name = Unicode::strtolower($this->randomMachineName());
+ $field_name = mb_strtolower($this->randomMachineName());
FieldStorageConfig::create([
'field_name' => $field_name,
'entity_type' => 'entity_test',