function MediaLibraryTestBase::getTypesMenu

Same name in other branches
  1. 9 core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase::getTypesMenu()
  2. 10 core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase::getTypesMenu()
  3. 11.x core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase::getTypesMenu()

Gets the menu of available media types.

Return value

\Behat\Mink\Element\NodeElement The menu of available media types.

2 calls to MediaLibraryTestBase::getTypesMenu()
MediaLibraryTestBase::assertNoMediaAdded in core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php
Asserts that media was not added, i.e. due to a validation error.
MediaLibraryTestBase::switchToMediaType in core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php
Clicks a media type tab and waits for it to appear.

File

core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php, line 167

Class

MediaLibraryTestBase
Base class for functional tests of Media Library functionality.

Namespace

Drupal\Tests\media_library\FunctionalJavascript

Code

protected function getTypesMenu() {
    return $this->assertSession()
        ->elementExists('css', '.js-media-library-menu');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.