From 97d2232dbb1fe9be7cae1bb3ba3dbbe741de3299 Mon Sep 17 00:00:00 2001 From: Michael Roterman Date: Sun, 23 Feb 2014 15:02:20 +0100 Subject: [PATCH] Updating CollectionRepositoryTest --- .../Repository/CollectionRepositoryTest.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/Tmdb/Tests/Repository/CollectionRepositoryTest.php b/test/Tmdb/Tests/Repository/CollectionRepositoryTest.php index 0dab17d5..adfe7cfe 100644 --- a/test/Tmdb/Tests/Repository/CollectionRepositoryTest.php +++ b/test/Tmdb/Tests/Repository/CollectionRepositoryTest.php @@ -12,6 +12,8 @@ */ namespace Tmdb\Tests\Repository; +use Tmdb\Repository\CollectionRepository; + class CollectionRepositoryTest extends TestCase { const COLLECTION_ID = 120; @@ -36,6 +38,22 @@ public function shouldGetImages() $repository->getImages(self::COLLECTION_ID); } + /** + * @test + */ + public function shouldBeAbleToSetFactories() + { + /** + * @var CollectionRepository $repository + */ + $repository = $this->getRepositoryWithMockedHttpClient(); + $class = new \stdClass(); + + $repository->setImageFactory($class); + + $this->assertInstanceOf('stdClass', $repository->getImageFactory()); + } + protected function getApiClass() { return 'Tmdb\Api\Collections';