'Hello **world**']); $result = (string) $comment->presenter()->markdownBody(); $this->assertStringContainsString('Hello', $result); $this->assertStringContainsString('world', $result); } public function test_markdown_body_is_truncated_when_limit_is_provided(): void { $body = str_repeat('a very long comment. ', 50); $comment = new Comment(['body' => $body]); $result = (string) $comment->presenter()->markdownBody(40); $this->assertLessThan(strlen($body), strlen($result)); $this->assertStringContainsString('...', $result); } public function test_markdown_body_is_not_truncated_when_body_is_shorter_than_limit(): void { $comment = new Comment(['body' => 'Short']); $result = (string) $comment->presenter()->markdownBody(100); $this->assertStringContainsString('Short', $result); $this->assertStringNotContainsString('...', $result); } }