Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfzdotnet committed Feb 9, 2014
1 parent 9586dc6 commit bf1d472
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion lib/Tmdb/Repository/CollectionRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/
namespace Tmdb\Repository;

use Tmdb\Client;
use Tmdb\Factory\CollectionFactory;
use Tmdb\Factory\ImageFactory;
use Tmdb\Model\Collection as ApiCollection;
Expand All @@ -22,8 +23,10 @@ class CollectionRepository extends AbstractRepository {

private $imageFactory;

public function __construct()
public function __construct(Client $client)
{
parent::__construct($client);

$this->imageFactory = new ImageFactory();
}

Expand Down
4 changes: 2 additions & 2 deletions test/Tmdb/Tests/Api/MoviesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public function shouldGetCast()
$api = $this->getApiMock();
$api->expects($this->once())
->method('get')
->with('movie/' . self::MOVIE_ID . '/casts');
->with('movie/' . self::MOVIE_ID . '/credits');

$api->getCast(self::MOVIE_ID);
$api->getCredits(self::MOVIE_ID);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test/Tmdb/Tests/Api/PeopleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function shouldGetCredits()
$api = $this->getApiMock();
$api->expects($this->once())
->method('get')
->with('person/' . self::PERSON_ID . '/credits');
->with('person/' . self::PERSON_ID . '/combined_credits');

$api->getCredits(self::PERSON_ID);
}
Expand Down
2 changes: 1 addition & 1 deletion test/Tmdb/Tests/Repository/CollectionRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function shouldGetImages()

protected function getApiClass()
{
return 'Tmdb\Api\Collection';
return 'Tmdb\Api\Collections';
}

protected function getRepositoryClass()
Expand Down

0 comments on commit bf1d472

Please sign in to comment.