'One Piece', 'slug' => 'one-piece', 'description' => 'Description', 'author' => 'Eiichiro Oda', 'publicationYear' => 1997, 'genres' => ['Action', 'Adventure'], 'status' => 'ongoing', 'imageUrl' => 'https://example.com/image.jpg', 'thumbnailUrl' => 'https://example.com/thumbnail.jpg', 'rating' => 4.5, 'monitored' => true, ]); // Act static::createClient()->request('GET', '/api/mangas/by-slug/one-piece'); // Assert $this->assertResponseIsSuccessful(); $this->assertJsonContains([ 'id' => (string) $manga->getId(), 'title' => 'One Piece', 'slug' => 'one-piece', 'description' => 'Description', 'author' => 'Eiichiro Oda', 'publicationYear' => 1997, 'genres' => ['Action', 'Adventure'], 'status' => 'ongoing', 'imageUrl' => 'https://example.com/image.jpg', 'rating' => 4.5, 'imageUrl' => 'https://example.com/image.jpg', ]); } public function testGetMangaBySlugReturns404WhenMangaNotFound(): void { // Act static::createClient()->request('GET', '/api/mangas/by-slug/non-existent-manga'); // Assert $this->assertResponseStatusCodeSame(Response::HTTP_NOT_FOUND); } }