1<?php
2/**
3 * This file is part of the Tmdb PHP API created by Michael Roterman.
4 *
5 * For the full copyright and license information, please view the LICENSE
6 * file that was distributed with this source code.
7 *
8 * @package Tmdb
9 * @author Michael Roterman <michael@wtfz.net>
10 * @copyright (c) 2013, Michael Roterman
11 * @version 0.0.1
12 */
13namespace Tmdb\Tests\Repository;
14
15use Tmdb\Model\Query\ChangesQuery;
16
17class ChangesRepositoryTest extends TestCase
18{
19    /**
20     * @test
21     */
22    public function shouldGetMovieChanges()
23    {
24        $repository = $this->getRepositoryWithMockedHttpAdapter();
25
26        $this->getAdapter()->expects($this->once())
27            ->method('get')
28            ->with($this->getRequest('https://api.themoviedb.org/3/movie/changes'))
29        ;
30
31        $query = new ChangesQuery();
32
33        $repository->getMovieChanges($query);
34    }
35
36    /**
37     * @test
38     */
39    public function shouldGetPeopleChanges()
40    {
41        $repository = $this->getRepositoryWithMockedHttpAdapter();
42
43        $this->getAdapter()->expects($this->once())
44            ->method('get')
45            ->with($this->getRequest('https://api.themoviedb.org/3/person/changes'))
46        ;
47
48        $query = new ChangesQuery();
49
50        $repository->getPeopleChanges($query);
51    }
52
53    /**
54     * @test
55     */
56    public function shouldGetTvChanges()
57    {
58        $repository = $this->getRepositoryWithMockedHttpAdapter();
59
60        $this->getAdapter()->expects($this->once())
61            ->method('get')
62            ->with($this->getRequest('https://api.themoviedb.org/3/tv/changes'))
63        ;
64
65        $query = new ChangesQuery();
66
67        $repository->getTvChanges($query);
68    }
69
70    protected function getApiClass()
71    {
72        return 'Tmdb\Api\Changes';
73    }
74
75    protected function getRepositoryClass()
76    {
77        return 'Tmdb\Repository\ChangesRepository';
78    }
79}
80