/** * @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 shouldWatchlistTvObject() { $repository = $this->getRepositoryWithMockedHttpAdapter(); $this->getAdapter()->expects($this->once())->method('post')->with($this->getRequest('account/' . self::ACCOUNT_ID . '/watchlist', [], 'POST', [], ['media_id' => self::MOVIE_ID, 'media_type' => 'tv', 'watchlist' => true])); $tv = new Tv(); $tv->setId(self::MOVIE_ID); $repository->watchlist(self::ACCOUNT_ID, $tv, true); }