forked from php-tmdb/api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
38450c0
commit a3980c9
Showing
20 changed files
with
1,114 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<?php | ||
/** | ||
* This file is part of the Tmdb PHP API created by Michael Roterman. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @package Tmdb | ||
* @author Michael Roterman <[email protected]> | ||
* @copyright (c) 2013, Michael Roterman | ||
* @version 0.0.1 | ||
*/ | ||
namespace Tmdb\Tests\Api; | ||
|
||
class AccountTest extends TestCase | ||
{ | ||
/** | ||
* @test | ||
* @expectedException Tmdb\Exception\NotImplementedException | ||
*/ | ||
public function shouldGetAccount() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->getAccount(); | ||
} | ||
|
||
/** | ||
* @test | ||
* @expectedException Tmdb\Exception\NotImplementedException | ||
*/ | ||
public function shouldGetLists() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->getLists('account_id'); | ||
} | ||
|
||
/** | ||
* @test | ||
* @expectedException Tmdb\Exception\NotImplementedException | ||
*/ | ||
public function shouldGetFavoriteMovies() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->getFavoriteMovies('account_id'); | ||
} | ||
|
||
/** | ||
* @test | ||
* @expectedException Tmdb\Exception\NotImplementedException | ||
*/ | ||
public function shouldFavorite() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->favorite('account_id'); | ||
} | ||
|
||
/** | ||
* @test | ||
* @expectedException Tmdb\Exception\NotImplementedException | ||
*/ | ||
public function shouldGetRatedMovies() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->getRatedMovies('account_id'); | ||
} | ||
|
||
/** | ||
* @test | ||
* @expectedException Tmdb\Exception\NotImplementedException | ||
*/ | ||
public function shouldGetMovieWatchlist() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->getMovieWatchlist('account_id'); | ||
} | ||
|
||
/** | ||
* @test | ||
* @expectedException Tmdb\Exception\NotImplementedException | ||
*/ | ||
public function shouldWatchlist() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->watchlist('account_id'); | ||
} | ||
|
||
protected function getApiClass() { | ||
return 'Tmdb\Api\Account'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
/** | ||
* This file is part of the Tmdb PHP API created by Michael Roterman. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @package Tmdb | ||
* @author Michael Roterman <[email protected]> | ||
* @copyright (c) 2013, Michael Roterman | ||
* @version 0.0.1 | ||
*/ | ||
namespace Tmdb\Tests\Api; | ||
|
||
class AuthenticationTest extends TestCase | ||
{ | ||
/** | ||
* @test | ||
* @expectedException Tmdb\Exception\NotImplementedException | ||
*/ | ||
public function shouldGetNewToken() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->getNewToken(); | ||
} | ||
|
||
/** | ||
* @test | ||
* @expectedException Tmdb\Exception\NotImplementedException | ||
*/ | ||
public function shouldGetNewSession() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->getNewSession('request_token'); | ||
} | ||
|
||
/** | ||
* @test | ||
* @expectedException Tmdb\Exception\NotImplementedException | ||
*/ | ||
public function shouldGetNewGuestSession() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->getNewGuestSession(); | ||
} | ||
|
||
protected function getApiClass() { | ||
return 'Tmdb\Api\Authentication'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
/** | ||
* This file is part of the Tmdb PHP API created by Michael Roterman. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @package Tmdb | ||
* @author Michael Roterman <[email protected]> | ||
* @copyright (c) 2013, Michael Roterman | ||
* @version 0.0.1 | ||
*/ | ||
namespace Tmdb\Tests\Api; | ||
|
||
class ChangesTest extends TestCase | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
public function shouldGetMovieChanges() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->expects($this->once()) | ||
->method('get') | ||
->with('movie/changes'); | ||
|
||
$api->getMovieChanges(); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function shouldGetPersonChanges() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->expects($this->once()) | ||
->method('get') | ||
->with('person/changes'); | ||
|
||
$api->getPersonChanges(); | ||
} | ||
|
||
protected function getApiClass() { | ||
return 'Tmdb\Api\Changes'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
/** | ||
* This file is part of the Tmdb PHP API created by Michael Roterman. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @package Tmdb | ||
* @author Michael Roterman <[email protected]> | ||
* @copyright (c) 2013, Michael Roterman | ||
* @version 0.0.1 | ||
*/ | ||
namespace Tmdb\Tests\Api; | ||
|
||
class ColletionsTest extends TestCase | ||
{ | ||
const COLLECTION_ID = 120; | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function shouldGetCollection() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->expects($this->once()) | ||
->method('get') | ||
->with('collection/' . self::COLLECTION_ID); | ||
|
||
$api->getCollection(self::COLLECTION_ID); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function shouldGetImages() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->expects($this->once()) | ||
->method('get') | ||
->with('collection/' . self::COLLECTION_ID . '/images'); | ||
|
||
$api->getImages(self::COLLECTION_ID); | ||
} | ||
|
||
protected function getApiClass() { | ||
return 'Tmdb\Api\Collections'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
/** | ||
* This file is part of the Tmdb PHP API created by Michael Roterman. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @package Tmdb | ||
* @author Michael Roterman <[email protected]> | ||
* @copyright (c) 2013, Michael Roterman | ||
* @version 0.0.1 | ||
*/ | ||
namespace Tmdb\Tests\Api; | ||
|
||
class CompaniesTest extends TestCase | ||
{ | ||
const COMPANY_ID = 1; | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function shouldGetCompany() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->expects($this->once()) | ||
->method('get') | ||
->with('company/' . self::COMPANY_ID); | ||
|
||
$api->getCompany(self::COMPANY_ID); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function shouldGetMovies() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->expects($this->once()) | ||
->method('get') | ||
->with('company/' . self::COMPANY_ID. '/movies'); | ||
|
||
$api->getMovies(self::COMPANY_ID); | ||
} | ||
|
||
protected function getApiClass() { | ||
return 'Tmdb\Api\Companies'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
/** | ||
* This file is part of the Tmdb PHP API created by Michael Roterman. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @package Tmdb | ||
* @author Michael Roterman <[email protected]> | ||
* @copyright (c) 2013, Michael Roterman | ||
* @version 0.0.1 | ||
*/ | ||
namespace Tmdb\Tests\Api; | ||
|
||
class ConfigurationTest extends TestCase | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
public function shouldGetConfiguration() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->expects($this->once()) | ||
->method('get') | ||
->with('configuration'); | ||
|
||
$api->getConfiguration(); | ||
} | ||
|
||
protected function getApiClass() { | ||
return 'Tmdb\Api\Configuration'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
/** | ||
* This file is part of the Tmdb PHP API created by Michael Roterman. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @package Tmdb | ||
* @author Michael Roterman <[email protected]> | ||
* @copyright (c) 2013, Michael Roterman | ||
* @version 0.0.1 | ||
*/ | ||
namespace Tmdb\Tests\Api; | ||
|
||
class DiscoverTest extends TestCase | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
public function shouldDiscoverMovies() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->expects($this->once()) | ||
->method('get') | ||
->with('discover/movie'); | ||
|
||
$api->discoverMovies(); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function shouldDiscoverTv() | ||
{ | ||
$api = $this->getApiMock(); | ||
$api->expects($this->once()) | ||
->method('get') | ||
->with('discover/tv'); | ||
|
||
$api->discoverTv(); | ||
} | ||
|
||
protected function getApiClass() { | ||
return 'Tmdb\Api\Discover'; | ||
} | ||
} |
Oops, something went wrong.