public function FrontMatterTest::testFrontMatterSerializerException in Drupal 10
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Component/FrontMatter/FrontMatterTest.php \Drupal\Tests\Component\FrontMatter\FrontMatterTest::testFrontMatterSerializerException()
Tests when a passed serializer doesn't implement the proper interface.
@covers ::__construct @covers ::create
File
- core/
tests/ Drupal/ Tests/ Component/ FrontMatter/ FrontMatterTest.php, line 51
Class
- FrontMatterTest
- Tests front matter parsing helper methods.
Namespace
Drupal\Tests\Component\FrontMatterCode
public function testFrontMatterSerializerException() {
$this
->expectException(\AssertionError::class);
$this
->expectExceptionMessage('The $serializer parameter must reference a class that implements Drupal\\Component\\Serialization\\SerializationInterface.');
FrontMatter::create('', '');
}