Skip to content

Commit 5c797f0

Browse files
committed
Unit tests
1 parent 05b3405 commit 5c797f0

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

test/Tmdb/Tests/Api/MoviesTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ public function shouldGetAlternativeTitles()
4040
$this->assertLastRequestIsWithPathAndMethod('/3/movie/' . self::MOVIE_ID . '/alternative_titles');
4141
}
4242

43+
/**
44+
* @test
45+
*/
46+
public function shouldGetExternalIds()
47+
{
48+
$api = $this->getApiWithMockedHttpAdapter();
49+
50+
$api->getExternalIds(self::MOVIE_ID);
51+
$this->assertLastRequestIsWithPathAndMethod('/3/movie/' . self::MOVIE_ID . '/external_ids');
52+
}
53+
4354
/**
4455
* @test
4556
*/

test/Tmdb/Tests/Model/MovieTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public function shouldConstructMovie()
3737
'getSpokenLanguages' => 'Tmdb\Model\Common\GenericCollection',
3838
'getAlternativeTitles' => 'Tmdb\Model\Common\GenericCollection',
3939
'getChanges' => 'Tmdb\Model\Common\GenericCollection',
40+
'getExternalIds' => 'Tmdb\Model\Common\ExternalIds',
4041
'getCredits' => 'Tmdb\Model\Collection\CreditsCollection',
4142
'getImages' => 'Tmdb\Model\Collection\Images',
4243
'getKeywords' => 'Tmdb\Model\Common\GenericCollection',

test/Tmdb/Tests/Repository/MovieRepositoryTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ public function shouldGetAlternativeTitles()
4545
$this->assertLastRequestIsWithPathAndMethod('/3/movie/' . self::MOVIE_ID . '/alternative_titles');
4646
}
4747

48+
/**
49+
* @test
50+
*/
51+
public function shouldGetExternalIds()
52+
{
53+
$repository = $this->getRepositoryWithMockedHttpAdapter();
54+
55+
$repository->getExternalIds(self::MOVIE_ID);
56+
$this->assertLastRequestIsWithPathAndMethod('/3/movie/' . self::MOVIE_ID . '/external_ids');
57+
}
58+
4859
/**
4960
* @test
5061
*/

0 commit comments

Comments
 (0)