Skip to content

Commit

Permalink
Tweak film test to account for both new and old site layout data
Browse files Browse the repository at this point in the history
  • Loading branch information
hmerritt committed Jun 3, 2021
1 parent 80afe1c commit 6283103
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/ImdbTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public function testFilm()
$this->assertEquals('2014', $film['year']);
$this->assertEquals('vi1586278169', $film['trailer']["id"]);
$this->assertEquals('https://www.imdb.com/video/vi1586278169', $film['trailer']["link"]);
$this->assertEquals('Cooper', $film['cast'][0]["character"]);
$this->assertEquals('Matthew McConaughey', $film['cast'][0]["actor"]);
$this->assertEquals('nm0000190', $film['cast'][0]["actor_id"]);
$this->assertContains($film['cast'][0]["character"], array('Cooper', 'Murph (Older)'));
$this->assertContains($film['cast'][0]["actor"], array('Matthew McConaughey', 'Ellen Burstyn'));
$this->assertContains($film['cast'][0]["actor_id"], array('nm0000190', 'nm0000995'));
}

public function testFilmBySearching()
Expand All @@ -34,9 +34,9 @@ public function testFilmBySearching()
$this->assertEquals('2014', $film['year']);
$this->assertEquals('vi1586278169', $film['trailer']["id"]);
$this->assertEquals('https://www.imdb.com/video/vi1586278169', $film['trailer']["link"]);
$this->assertEquals('Cooper', $film['cast'][0]["character"]);
$this->assertEquals('Matthew McConaughey', $film['cast'][0]["actor"]);
$this->assertEquals('nm0000190', $film['cast'][0]["actor_id"]);
$this->assertContains($film['cast'][0]["character"], array('Cooper', 'Murph (Older)'));
$this->assertContains($film['cast'][0]["actor"], array('Matthew McConaughey', 'Ellen Burstyn'));
$this->assertContains($film['cast'][0]["actor_id"], array('nm0000190', 'nm0000995'));
}

public function testFilmOptions()
Expand Down

0 comments on commit 6283103

Please sign in to comment.