Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions lib/Tmdb/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);

Expand All @@ -248,6 +246,9 @@ protected function configureOptions(array $options)
);
}

$this->options['cache'] = $this->configureCacheOptions($options);
$this->options['log'] = $this->configureLogOptions($options);

return $this->options;
}

Expand Down
4 changes: 0 additions & 4 deletions lib/Tmdb/Repository/AccountRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
{
Expand All @@ -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 = [])
{
Expand Down
1 change: 0 additions & 1 deletion lib/Tmdb/Repository/PeopleRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#people
*
* @todo implement the new methods
*/
class PeopleRepository extends AbstractRepository
{
Expand Down
8 changes: 3 additions & 5 deletions test/Tmdb/Tests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down
3 changes: 0 additions & 3 deletions test/Tmdb/Tests/Repository/PeopleRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down