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.
Removing unnecassary classes related to people
- Loading branch information
1 parent
e9254ff
commit 19003d5
Showing
12 changed files
with
215 additions
and
133 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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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\Model\Person; | ||
|
||
use Tmdb\Common\ObjectHydrator; | ||
use Tmdb\Model\Person\CastMember; | ||
use Tmdb\Tests\Model\TestCase; | ||
|
||
class CastMemberTest extends TestCase | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
public function shouldBeFunctional() | ||
{ | ||
$data = array( | ||
'id' => 819, | ||
'name' => 'Edward Norton', | ||
'character' => 'The Narrator', | ||
'order' => 0, | ||
'cast_id' => 4, | ||
'profile_path' => '/588Hrov6wwM9WcU88nJHlw2iufN.jpg' | ||
); | ||
|
||
$hydrator = new ObjectHydrator(); | ||
|
||
$object = $hydrator->hydrate(new CastMember(), $data); | ||
|
||
$this->assertEquals(819, $object->getId()); | ||
$this->assertEquals('Edward Norton', $object->getName()); | ||
$this->assertEquals('The Narrator', $object->getCharacter()); | ||
$this->assertEquals(0, $object->getOrder()); | ||
$this->assertEquals(4, $object->getCastId()); | ||
$this->assertEquals('/588Hrov6wwM9WcU88nJHlw2iufN.jpg', $object->getProfilePath()); | ||
} | ||
} |
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,44 @@ | ||
<?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\Model\Person; | ||
|
||
use Tmdb\Common\ObjectHydrator; | ||
use Tmdb\Model\Person\CrewMember; | ||
use Tmdb\Tests\Model\TestCase; | ||
|
||
class CrewMemberTest extends TestCase | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
public function shouldBeFunctional() | ||
{ | ||
$data = array( | ||
'id' => 7477, | ||
'name' => 'John King', | ||
'department' => 'Sound', | ||
'job' => 'Original Music Composer', | ||
'profile_path' => null | ||
); | ||
|
||
$hydrator = new ObjectHydrator(); | ||
|
||
$object = $hydrator->hydrate(new CrewMember(), $data); | ||
|
||
$this->assertEquals(7477, $object->getId()); | ||
$this->assertEquals('John King', $object->getName()); | ||
$this->assertEquals('Sound', $object->getDepartment()); | ||
$this->assertEquals('Original Music Composer', $object->getJob()); | ||
$this->assertEquals(null, $object->getProfilePath()); | ||
} | ||
} |
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\Model\Tv; | ||
|
||
use Tmdb\Common\ObjectHydrator; | ||
use Tmdb\Model\Tv\ExternalIds; | ||
use Tmdb\Tests\Model\TestCase; | ||
|
||
class ExternalIdsTest extends TestCase | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
public function shouldBeFunctional() | ||
{ | ||
$data = array( | ||
'imdb_id' => 'tt0903747', | ||
'freebase_id' => '/en/breaking_bad', | ||
'freebase_mid' => '/m/03d34x8', | ||
'id' => 1396, | ||
'tvdb_id' => 81189, | ||
'tvrage_id' => 18164, | ||
); | ||
|
||
$hydrator = new ObjectHydrator(); | ||
|
||
$object = $hydrator->hydrate(new ExternalIds(), $data); | ||
|
||
$this->assertEquals('tt0903747', $object->getImdbId()); | ||
$this->assertEquals('/en/breaking_bad', $object->getFreebaseId()); | ||
$this->assertEquals('/m/03d34x8', $object->getFreebaseMid()); | ||
$this->assertEquals(1396, $object->getId()); | ||
$this->assertEquals(81189, $object->getTvdbId()); | ||
$this->assertEquals(18164, $object->getTvrageId()); | ||
} | ||
} |
Oops, something went wrong.