/** * @test */ public function shouldGetVideos() { $repository = $this->getRepositoryWithMockedHttpClient(); $tv = new Tv(); $tv->setId(self::TV_ID); $season = new Tv\Season(); $season->setId(self::SEASON_ID); $repository->getVideos($tv, $season); }
/** * @expectedException Tmdb\Exception\RuntimeException * @test */ public function shouldThrowExceptionWhenConditionsNotMet() { $repository = $this->getRepositoryWithMockedHttpClient(); $tv = new Tv(); $tv->setId(self::TV_ID); $season = new Season(); $season->setId(self::SEASON_ID); $repository->load($tv, $season, null); }
/** * @test */ public function shouldGetVideos() { $repository = $this->getRepositoryWithMockedHttpAdapter(); $this->getAdapter()->expects($this->once())->method('get')->with($this->getRequest('tv/' . self::TV_ID . '/season/' . self::SEASON_ID . '/videos')); $tv = new Tv(); $tv->setId(self::TV_ID); $season = new Tv\Season(); $season->setId(self::SEASON_ID); $repository->getVideos($tv, $season); }