Working state
This commit is contained in:
@@ -59,6 +59,21 @@ final class PostExtensionTest extends TestCase
|
||||
self::assertNull($this->call('post_thumbnail', $post));
|
||||
}
|
||||
|
||||
|
||||
public function testPostExcerptReturnsHtmlUnchangedWhenContentIsShortEnough(): void
|
||||
{
|
||||
$post = new Post(4, 'Titre', '<p><strong>Bonjour</strong> monde</p>', 'titre-4');
|
||||
|
||||
self::assertSame('<strong>Bonjour</strong> monde', $this->call('post_excerpt', $post, 50));
|
||||
}
|
||||
|
||||
public function testPostInitialsFallsBackToFirstRawCharacterWhenOnlyStopWordsRemain(): void
|
||||
{
|
||||
$post = new Post(5, 'de la', '<p>Contenu</p>', 'slug-5');
|
||||
|
||||
self::assertSame('D', $this->call('post_initials', $post));
|
||||
}
|
||||
|
||||
public function testPostInitialsUseMeaningfulWordsAndFallback(): void
|
||||
{
|
||||
$post = new Post(1, 'Article de Blog', '<p>Contenu</p>', 'slug');
|
||||
|
||||
Reference in New Issue
Block a user