diff --git a/lib/Tmdb/Factory/Movie/ListItemFactory.php b/lib/Tmdb/Factory/Movie/ListItemFactory.php index 3d5332fe..cd06d646 100644 --- a/lib/Tmdb/Factory/Movie/ListItemFactory.php +++ b/lib/Tmdb/Factory/Movie/ListItemFactory.php @@ -45,21 +45,7 @@ public function create(array $data = array()) */ public function createCollection(array $data = array()) { - $collection = new ResultCollection(); - - $collection->setPage($data['page']); - $collection->setTotalPages($data['total_pages']); - $collection->setTotalResults($data['total_results']); - - if (array_key_exists('results', $data)) { - $data = $data['results']; - } - - foreach($data as $item) { - $collection->add(null, $this->create($item)); - } - - return $collection; + return $this->createResultCollection($data); } /** diff --git a/test/Tmdb/Tests/Repository/MovieRepositoryTest.php b/test/Tmdb/Tests/Repository/MovieRepositoryTest.php index 49b83795..a44bf7f8 100644 --- a/test/Tmdb/Tests/Repository/MovieRepositoryTest.php +++ b/test/Tmdb/Tests/Repository/MovieRepositoryTest.php @@ -124,9 +124,9 @@ public function shouldGetReviews() */ public function shouldGetLists() { -// $repository = $this->getRepositoryWithMockedHttpClient(); -// -// $repository->getLists(self::MOVIE_ID); + $repository = $this->getRepositoryWithMockedHttpClient(); + + $repository->getLists(self::MOVIE_ID); } /**