diff --git a/lib/Tmdb/Client.php b/lib/Tmdb/Client.php index 10a151bd..b866e041 100644 --- a/lib/Tmdb/Client.php +++ b/lib/Tmdb/Client.php @@ -209,8 +209,8 @@ protected function configureOptions(array $options) 'token' => null, 'session_token' => null, 'event_dispatcher' => array_key_exists('event_dispatcher', $this->options) ? $this->options['event_dispatcher'] : new EventDispatcher(), - 'cache' => $this->configureCacheOptions($options), - 'log' => $this->configureLogOptions($options), + 'cache' => [], + 'log' => [], ]); $resolver->setNormalizer('base_url', function ($options, $value) { @@ -237,8 +237,6 @@ protected function configureOptions(array $options) $resolver->setAllowedTypes('token', 'object'); $resolver->setAllowedTypes('session_token', ['object', 'null']); $resolver->setAllowedTypes('event_dispatcher', 'object'); - $resolver->setAllowedTypes('cache', 'array'); - $resolver->setAllowedTypes('log', 'array'); $this->options = $resolver->resolve($options); @@ -248,6 +246,9 @@ protected function configureOptions(array $options) ); } + $this->options['cache'] = $this->configureCacheOptions($options); + $this->options['log'] = $this->configureLogOptions($options); + return $this->options; } diff --git a/lib/Tmdb/Repository/AccountRepository.php b/lib/Tmdb/Repository/AccountRepository.php index 878e849f..7cece32b 100644 --- a/lib/Tmdb/Repository/AccountRepository.php +++ b/lib/Tmdb/Repository/AccountRepository.php @@ -113,8 +113,6 @@ public function favorite($accountId, $media, $isFavorite = true, $mediaType = 'm * @param array $parameters * @param array $headers * @return ResultCollection - * - * @todo Include the user rating */ public function getRatedMovies($accountId, array $parameters = [], array $headers = []) { @@ -130,8 +128,6 @@ public function getRatedMovies($accountId, array $parameters = [], array $header * @param array $parameters * @param array $headers * @return ResultCollection - * - * @todo Include the user rating */ public function getRatedTvShows($accountId, array $parameters = [], array $headers = []) { diff --git a/lib/Tmdb/Repository/PeopleRepository.php b/lib/Tmdb/Repository/PeopleRepository.php index db9555d0..c4f510ef 100644 --- a/lib/Tmdb/Repository/PeopleRepository.php +++ b/lib/Tmdb/Repository/PeopleRepository.php @@ -22,7 +22,6 @@ * @package Tmdb\Repository * @see http://docs.themoviedb.apiary.io/#people * - * @todo implement the new methods */ class PeopleRepository extends AbstractRepository { diff --git a/test/Tmdb/Tests/ClientTest.php b/test/Tmdb/Tests/ClientTest.php index 7db4598b..afd6480b 100644 --- a/test/Tmdb/Tests/ClientTest.php +++ b/test/Tmdb/Tests/ClientTest.php @@ -107,13 +107,12 @@ public function testShouldSwitchHttpScheme() } /** - * @todo + * @test */ public function shouldAddCachePluginWhenEnabled() { $token = new ApiToken(self::API_TOKEN); $client = new Client($token); - $client->setCaching(true, '/tmp/php-tmdb-api'); $listeners = $client->getHttpClient()->getAdapter()->getClient() ->getEmitter() @@ -126,13 +125,12 @@ public function shouldAddCachePluginWhenEnabled() } /** - * @todo + * @test */ public function shouldAddLoggingPluginWhenEnabled() { $token = new ApiToken(self::API_TOKEN); - $client = new Client($token); - $client->setLogging(true, '/tmp/php-tmdb-api.log'); + $client = new Client($token, ['log' => ['enabled' => true]]); $listeners = $client->getHttpClient()->getAdapter()->getClient() ->getEmitter() diff --git a/test/Tmdb/Tests/Repository/PeopleRepositoryTest.php b/test/Tmdb/Tests/Repository/PeopleRepositoryTest.php index b44fcefa..f45957df 100644 --- a/test/Tmdb/Tests/Repository/PeopleRepositoryTest.php +++ b/test/Tmdb/Tests/Repository/PeopleRepositoryTest.php @@ -12,9 +12,6 @@ */ namespace Tmdb\Tests\Repository; -/** - * @todo review if the rest of the methods need to be added - */ class PeopleRepositoryTest extends TestCase { const PERSON_ID = 287;