public function MediaLibraryStateTest::testFromRequestQueryLess in Drupal 10
Same name and namespace in other branches
- 8 core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php \Drupal\Tests\media_library\Kernel\MediaLibraryStateTest::testFromRequestQueryLess()
- 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 297
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);
}