function MediaLibraryStateTest::testFromRequestQueryLess
Same name in other branches
- 9 core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php \Drupal\Tests\media_library\Kernel\MediaLibraryStateTest::testFromRequestQueryLess()
- 8.9.x core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php \Drupal\Tests\media_library\Kernel\MediaLibraryStateTest::testFromRequestQueryLess()
- 10 core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php \Drupal\Tests\media_library\Kernel\MediaLibraryStateTest::testFromRequestQueryLess()
@covers ::fromRequest
File
-
core/
modules/ media_library/ tests/ src/ Kernel/ MediaLibraryStateTest.php, line 298
Class
- MediaLibraryStateTest
- Tests the media library state value object.
Namespace
Drupal\Tests\media_library\KernelCode
public function testFromRequestQueryLess() : void {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('The opener ID parameter is required and must be a string.');
$state = MediaLibraryState::fromRequest(new Request());
$this->assertInstanceOf(MediaLibraryState::class, $state);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.