public function MediaLibraryStateTest::testFromRequestQueryLess in Drupal 8
Same name and namespace in other branches
- 9 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 289
Class
- MediaLibraryStateTest
- Tests the media library state value object.
Namespace
Drupal\Tests\media_library\KernelCode
public function testFromRequestQueryLess() {
$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);
}