diff --git a/tests/CalendarTest.php b/tests/CalendarTest.php index 89f06579..58c0bbd1 100644 --- a/tests/CalendarTest.php +++ b/tests/CalendarTest.php @@ -28,7 +28,7 @@ protected function getCalendar() $config->imdbsite = 'www.imdb.com'; $config->cachedir = realpath(dirname(__FILE__) . '/cache') . '/'; $config->usezip = false; - $config->cache_expire = 3600; + $config->cache_expire = 86400; return new Calendar($config); } diff --git a/tests/ChartsTest.php b/tests/ChartsTest.php index 163aa8be..1efb74c2 100644 --- a/tests/ChartsTest.php +++ b/tests/ChartsTest.php @@ -45,7 +45,7 @@ protected function getCharts() $config->imdbsite = 'www.imdb.com'; $config->cachedir = realpath(dirname(__FILE__) . '/cache') . '/'; $config->usezip = false; - $config->cache_expire = 3600; + $config->cache_expire = 86400; return new Charts($config); } diff --git a/tests/PersonSearchTest.php b/tests/PersonSearchTest.php index df1eabc3..41b87ab9 100644 --- a/tests/PersonSearchTest.php +++ b/tests/PersonSearchTest.php @@ -37,7 +37,7 @@ protected function getimdbpersonsearch() $config->language = 'en'; $config->cachedir = realpath(dirname(__FILE__) . '/cache') . '/'; $config->usezip = false; - $config->cache_expire = 3600; + $config->cache_expire = 86400; $config->debug = false; $imdbsearch = new PersonSearch($config); diff --git a/tests/PersonTest.php b/tests/PersonTest.php index d44baf8c..7740eb45 100644 --- a/tests/PersonTest.php +++ b/tests/PersonTest.php @@ -515,7 +515,7 @@ protected function getimdb_person($id = '0594503') $config->imdbsite = 'www.imdb.com'; $config->cachedir = realpath(dirname(__FILE__) . '/cache') . '/'; $config->usezip = false; - $config->cache_expire = 3600; + $config->cache_expire = 86400; return new \Imdb\Person($id, $config); } diff --git a/tests/TitleSearchAdvancedTest.php b/tests/TitleSearchAdvancedTest.php index 84fa1291..4c4e88d2 100644 --- a/tests/TitleSearchAdvancedTest.php +++ b/tests/TitleSearchAdvancedTest.php @@ -81,7 +81,7 @@ protected function getTitleSearchAdvanced() $config->imdbsite = 'www.imdb.com'; $config->cachedir = realpath(dirname(__FILE__) . '/cache') . '/'; $config->usezip = false; - $config->cache_expire = 3600; + $config->cache_expire = 86400; return new TitleSearchAdvanced($config); } diff --git a/tests/TitleSearchTest.php b/tests/TitleSearchTest.php index 83bf670a..c173aeb1 100644 --- a/tests/TitleSearchTest.php +++ b/tests/TitleSearchTest.php @@ -197,7 +197,7 @@ protected function getimdbsearch() $config->language = 'en'; $config->cachedir = realpath(dirname(__FILE__) . '/cache') . '/'; $config->usezip = false; - $config->cache_expire = 3600; + $config->cache_expire = 86400; $config->debug = false; $imdbsearch = new TitleSearch($config); diff --git a/tests/TitleTest.php b/tests/TitleTest.php index 810994b6..5c6a22b4 100644 --- a/tests/TitleTest.php +++ b/tests/TitleTest.php @@ -225,7 +225,7 @@ public function testOrig_title_with_no_original() public function testOrig_title_with_original() { $imdb = $this->getImdb('0087544'); - $this->assertEquals('Kaze no tani no Naushika', $imdb->orig_title()); + $this->assertEquals('Kaze no Tani no NausicaƤ', $imdb->orig_title()); } public function testYear_for_a_film() @@ -356,8 +356,8 @@ public function testVotes() { $imdb = $this->getImdb(); $votes = $imdb->votes(); - $this->assertGreaterThan(1500000, $votes); - $this->assertLessThan(2000000, $votes); + $this->assertGreaterThan(2000000, $votes); + $this->assertLessThan(3000000, $votes); } // public function testVotes_no_votes() @@ -439,9 +439,9 @@ public function testKeywords() { $imdb = $this->getImdb("0306414"); $keywords = $imdb->keywords(); - $this->assertTrue(in_array('corruption', $keywords)); $this->assertTrue(in_array('drug trafficking', $keywords)); - $this->assertTrue(in_array('urban decay', $keywords)); + $this->assertTrue(in_array('baltimore maryland', $keywords)); + $this->assertTrue(in_array('police', $keywords)); } public function testLanguage() @@ -758,9 +758,9 @@ public function testAlsoknow() $matchNames = []; foreach ($akas as $aka) { - if ($aka['title'] == 'Kaze no tani no Naushika' && $aka['comment'] == 'original title') { + if ($aka['title'] == 'Kaze no Tani no NausicaƤ' && $aka['comment'] == 'original title') { // Original title - $this->assertEquals('Kaze no tani no Naushika', $aka['title']); + $this->assertEquals('Kaze no Tani no NausicaƤ', $aka['title']); $this->assertEquals( $aka['comment'], 'original title' @@ -1448,8 +1448,8 @@ public function testGoofs() $goofs = $imdb->goofs(); $this->assertIsArray($goofs); - $this->assertGreaterThan(140, count($goofs)); - $this->assertLessThan(170, count($goofs)); + $this->assertGreaterThan(40, count($goofs)); + $this->assertLessThan(51, count($goofs)); $this->assertEquals('Audio/visual unsynchronised', $goofs[0]['type']); $this->assertEquals('When Neo meets Trinity for the first time in the nightclub she is close to him talking in his ear. Even though she pauses between sentences the shot from the back of Trinity shows that her jaw is still moving during the pauses.', $goofs[0]['content']); @@ -1460,7 +1460,7 @@ public function testQuotes() $imdb = $this->getImdb(); $quotes = $imdb->quotes(); - $this->assertGreaterThan(100, count($quotes)); + $this->assertEquals(50, count($quotes)); } public function testQuotes_split() @@ -1488,7 +1488,7 @@ public function testQuotes_split() array( 'quote' => 'All in the game yo, all in the game.', 'character' => array( - 'url' => 'https://www.imdb.com/name/nm0931324/?ref_=tt_trv_qu', + 'url' => 'https://www.imdb.com/name/nm0931324/?ref_=ttqu_qu', 'name' => 'Omar' ) ) @@ -1543,8 +1543,8 @@ public function testTrivia() $imdb = $this->getImdb(); $trivia = $imdb->trivia(); - $this->assertGreaterThan(100, count($trivia)); - $this->assertTrue(in_array('The lobby shootout took ten days to film.', $trivia)); + $this->assertEquals(5, count($trivia)); + $this->assertTrue(in_array('The opening action scene took six months of training and four days to shoot.', $trivia)); } public function testTrivia_spoilers() @@ -1639,7 +1639,7 @@ public function test_locations() { $imdb = $this->getImdb(107290); $locations = $imdb->locations(); - $this->assertGreaterThan(17, $locations); + $this->assertEquals(5, count($locations)); $matches = 0; foreach ($locations as $location) { @@ -1665,7 +1665,7 @@ public function testProdCompany() $prodCompany = $imdb->prodCompany(); $this->assertEquals('Warner Bros.', $prodCompany[0]['name']); $this->stringStartsWith('https://www.imdb.com/company/co0002663')->evaluate($prodCompany[0]['url']); - $this->assertEquals('(presents)', $prodCompany[0]['notes']); + $this->assertEquals('(presentation)', $prodCompany[0]['notes']); } public function testDistCompany() @@ -1714,7 +1714,7 @@ public function testParentalGuide_spoilers() { $imdb = $this->getImdb(120737); $parentalGuide = $imdb->parentalGuide(true); - $violence = $parentalGuide['Frightening'][1]; + $violence = $parentalGuide['Frightening'][0]; $this->assertSame(0, strpos($violence, 'Gandalf\'s "death" scene')); } @@ -1735,9 +1735,9 @@ public function testKeywords_all() { $imdb = $this->getImdb(); $keywords_all = $imdb->keywords_all(); - $this->assertGreaterThan(250, count($keywords_all)); + $this->assertEquals(50, count($keywords_all)); $this->assertTrue(in_array('truth', $keywords_all)); - $this->assertTrue(in_array('human machine relationship', $keywords_all)); + $this->assertTrue(in_array('reference to alice in wonderland', $keywords_all)); } public function test_title_redirects_are_followed()