Skip to content

Commit

Permalink
Test for no producers. Refs #86
Browse files Browse the repository at this point in the history
  • Loading branch information
tboothman committed Feb 21, 2017
1 parent 0be6d83 commit cbbe246
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/TitleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class imdb_titleTest extends PHPUnit_Framework_TestCase {
* 1799527 = DOOM (2016) Video Game
*
* 0314979 = Battlestar Galactica (Tv Miniseries / no end date)
*
* 149937 = Bottom Live (Video)
*/

public function testConstruct_from_ini_constructed_config() {
Expand Down Expand Up @@ -110,6 +112,11 @@ public function testMovietype_on_videoGame() {
$this->assertEquals('Video Game', $imdb->movietype());
}

public function testMovieType_on_video() {
$imdb = $this->getImdb(149937);
$this->assertEquals('Video', $imdb->movietype());
}

public function testTitle() {
$imdb = $this->getImdb();
$this->assertEquals('The Matrix', $imdb->title());
Expand Down Expand Up @@ -834,6 +841,13 @@ public function testWriting() {
//@TODO more
}

public function testProducer_no_producers() {
$imdb = $this->getImdb(149937);
$producers = $imdb->producer();
$this->assertInternalType('array', $producers);
$this->assertCount(0, $producers);
}

public function testProducer() {
$imdb = $this->getImdb();
$producers = $imdb->producer();
Expand Down

0 comments on commit cbbe246

Please sign in to comment.