function OEmbedFormatterTest::testDisplayConfiguration
Same name in other branches
- 9 core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php \Drupal\Tests\media\Functional\FieldFormatter\OEmbedFormatterTest::testDisplayConfiguration()
- 10 core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php \Drupal\Tests\media\Functional\FieldFormatter\OEmbedFormatterTest::testDisplayConfiguration()
- 11.x core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php \Drupal\Tests\media\Functional\FieldFormatter\OEmbedFormatterTest::testDisplayConfiguration()
Tests that oEmbed media types' display can be configured correctly.
File
-
core/
modules/ media/ tests/ src/ Functional/ FieldFormatter/ OEmbedFormatterTest.php, line 138
Class
Namespace
Drupal\Tests\media\Functional\FieldFormatterCode
public function testDisplayConfiguration() {
$account = $this->drupalCreateUser([
'administer media display',
]);
$this->drupalLogin($account);
$media_type = $this->createMediaType('oembed:video');
$this->drupalGet('/admin/structure/media/manage/' . $media_type->id() . '/display');
$assert = $this->assertSession();
$assert->statusCodeEquals(200);
// Test that the formatter doesn't try to check applicability for fields
// which do not have a specific target bundle.
// @see https://www.drupal.org/project/drupal/issues/2976795.
$assert->pageTextNotContains('Can only flip STRING and INTEGER values!');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.