summaryrefslogtreecommitdiffstats
path: root/core/modules/media/tests/src/Kernel/MediaTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/media/tests/src/Kernel/MediaTest.php')
-rw-r--r--core/modules/media/tests/src/Kernel/MediaTest.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/modules/media/tests/src/Kernel/MediaTest.php b/core/modules/media/tests/src/Kernel/MediaTest.php
index d246fb6..df48a9b 100644
--- a/core/modules/media/tests/src/Kernel/MediaTest.php
+++ b/core/modules/media/tests/src/Kernel/MediaTest.php
@@ -21,14 +21,17 @@ class MediaTest extends MediaKernelTestBase {
}
/**
- * Ensure media name is configurable on manage display.
+ * Tests the Media "name" base field behavior.
*/
- public function testNameIsConfigurable() {
+ public function testNameBaseField() {
/** @var \Drupal\Core\Field\BaseFieldDefinition[] $field_definitions */
$field_definitions = $this->container->get('entity_field.manager')
->getBaseFieldDefinitions('media');
+ // Ensure media name is configurable on manage display.
$this->assertTrue($field_definitions['name']->isDisplayConfigurable('view'));
+ // Ensure it is not visible by default.
+ $this->assertEquals($field_definitions['name']->getDisplayOptions('view'), ['region' => 'hidden']);
}
}