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.
Unit tests for Keyword, and removing unneccasary Movie/Keyword ( upda…
…ted MovieFactory to reflect this ).
- Loading branch information
1 parent
5b21bf5
commit 849d9e5
Showing
8 changed files
with
285 additions
and
75 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 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\Factory; | ||
|
||
use Tmdb\Factory\KeywordFactory; | ||
|
||
class KeywordFactoryTest extends TestCase | ||
{ | ||
private $data; | ||
|
||
public function setUp() | ||
{ | ||
$this->data = $this->loadByFile('keywords/get.json'); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function shouldConstructKeyword() | ||
{ | ||
/** | ||
* @var KeywordFactory $factory | ||
*/ | ||
$factory = $this->getFactory(); | ||
$keyword = $factory->create($this->data); | ||
|
||
$this->assertInstanceOf('Tmdb\Model\Keyword', $keyword); | ||
$this->assertEquals(1721, $keyword->getId()); | ||
$this->assertEquals('fight', $keyword->getName()); | ||
} | ||
|
||
protected function getFactoryClass() | ||
{ | ||
return 'Tmdb\Factory\KeywordFactory'; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"id": 1721, | ||
"name": "fight" | ||
} |
Oops, something went wrong.