You are here

protected function ContentModerationTest::assertOnlyPublishedMedia in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php \Drupal\Tests\media_library\FunctionalJavascript\ContentModerationTest::assertOnlyPublishedMedia()

Asserts only published media items are visible.

2 calls to ContentModerationTest::assertOnlyPublishedMedia()
ContentModerationTest::testAdministrationPage in core/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php
Tests the media library widget only shows published media.
ContentModerationTest::testWidget in core/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php
Tests the media library widget only shows published media.

File

core/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php, line 326

Class

ContentModerationTest
Tests media library integration with content moderation.

Namespace

Drupal\Tests\media_library\FunctionalJavascript

Code

protected function assertOnlyPublishedMedia() {
  $assert_session = $this
    ->assertSession();
  $assert_session
    ->pageTextNotContains('Hoglet');
  $assert_session
    ->pageTextContains('Panda');
  $assert_session
    ->pageTextNotContains('Mammoth');
}