Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
app2641 committed May 7, 2016
1 parent 1b2e136 commit 32ca266
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 20 deletions.
1 change: 1 addition & 0 deletions src/Midnight/Crawler/UriManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public function resolve ($url)
switch ($this->parse_data['host']) {
case 'flashservice.xvideos.com':
case 'www.xvideos.com':
case 'jp.xvideos.com':
$url = $this->_resolveXvideosUrl();
break;

Expand Down
2 changes: 1 addition & 1 deletion tests/Midnight/Crawler/Plugin/AdultVideoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function 動画へのリンクを取得する ()
$movies_url = $this->plugin->getMoviesUrl($html);

$this->assertTrue(is_array($movies_url));
$this->assertEquals('http://jp.xvideos.com/video2960239/', $movies_url[0]);
$this->assertEquals('http://www.xvideos.com/video2960239/', $movies_url[0]);
}


Expand Down
4 changes: 2 additions & 2 deletions tests/Midnight/Crawler/Plugin/AvSelectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ public function 動画へのリンクを取得する ()
$movies_url = $this->plugin->getMoviesUrl($html);

$this->assertTrue(is_array($movies_url));
$this->assertEquals('http://jp.xvideos.com/video7994012/', $movies_url[0]);
$this->assertEquals('http://jp.xvideos.com/video7994057/', $movies_url[1]);
$this->assertEquals('http://www.xvideos.com/video7994012/', $movies_url[0]);
$this->assertEquals('http://www.xvideos.com/video7994057/', $movies_url[1]);
}
}

8 changes: 4 additions & 4 deletions tests/Midnight/Crawler/Plugin/DoesuTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ public function 動画へのリンクを取得する ()
$movies_url = $this->plugin->getMoviesUrl($html);

$this->assertTrue(is_array($movies_url));
$this->assertEquals('http://jp.xvideos.com/video7395344/', $movies_url[0]);
$this->assertEquals('http://jp.xvideos.com/video7395350/', $movies_url[1]);
$this->assertEquals('http://jp.xvideos.com/video7395352/', $movies_url[2]);
$this->assertEquals('http://jp.xvideos.com/video7395354/', $movies_url[3]);
$this->assertEquals('http://www.xvideos.com/video7395344/', $movies_url[0]);
$this->assertEquals('http://www.xvideos.com/video7395350/', $movies_url[1]);
$this->assertEquals('http://www.xvideos.com/video7395352/', $movies_url[2]);
$this->assertEquals('http://www.xvideos.com/video7395354/', $movies_url[3]);
}
}

4 changes: 2 additions & 2 deletions tests/Midnight/Crawler/Plugin/EpustaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function 動画へのリンクを取得する ()
$movies_url = $this->plugin->getMoviesUrl($html);

$this->assertTrue(is_array($movies_url));
$this->assertEquals('http://jp.xvideos.com/video8384715/', $movies_url[0]);
$this->assertEquals('http://jp.xvideos.com/video8384744/', $movies_url[1]);
$this->assertEquals('http://www.xvideos.com/video8384715/', $movies_url[0]);
$this->assertEquals('http://www.xvideos.com/video8384744/', $movies_url[1]);
}
}
2 changes: 1 addition & 1 deletion tests/Midnight/Crawler/Plugin/EromonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public function 動画へのリンクを取得する2 ()

$this->assertTrue(is_array($movies_url));
$this->assertEquals(
'http://jp.xvideos.com/video10683385/', $movies_url[0]
'http://www.xvideos.com/video10683385/', $movies_url[0]
);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Midnight/Crawler/Plugin/HentaiAnimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public function 動画リンクを取得する3 ()
$movies_url = $this->plugin->getMoviesUrl($html);

$this->assertTrue(is_array($movies_url));
$this->assertEquals('http://jp.xvideos.com/video7221606/', $movies_url[0]);
$this->assertEquals('http://www.xvideos.com/video7221606/', $movies_url[0]);
$this->assertEquals('http://www.drtuber.com/video/86891/cougar-trap-ep-2-final', $movies_url[1]);
$this->assertEquals(
'http://myvi.tv/embed/html/ozATb8X10940rYjKtpS62pE9PqQ7rNPcb_MskTNo75D-R7IMrA5Z79ES1He8Waz9h0', $movies_url[2]
Expand Down
4 changes: 2 additions & 2 deletions tests/Midnight/Crawler/Plugin/MatomeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function 動画へのリンクを取得する ()
$movies_url = $this->plugin->getMoviesUrl($html);

$this->assertTrue(is_array($movies_url));
$this->assertEquals('http://jp.xvideos.com/video8236196/', $movies_url[0]);
$this->assertEquals('http://jp.xvideos.com/video8236299/', $movies_url[1]);
$this->assertEquals('http://www.xvideos.com/video8236196/', $movies_url[0]);
$this->assertEquals('http://www.xvideos.com/video8236299/', $movies_url[1]);
}
}
2 changes: 1 addition & 1 deletion tests/Midnight/Crawler/Plugin/MinnaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public function 動画へのリンクを取得する ()
$movies_url = $this->plugin->getMoviesUrl($html);

$this->assertTrue(is_array($movies_url));
$this->assertEquals('http://jp.xvideos.com/video7440211/', $movies_url[0]);
$this->assertEquals('http://www.xvideos.com/video7440211/', $movies_url[0]);


$html = $this->plugin->fetchHtml($this->test_data->getHtmlPaths()[3]);
Expand Down
4 changes: 2 additions & 2 deletions tests/Midnight/Crawler/Plugin/MuryoEroTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ public function 動画へのリンクを取得する1 ()
$movies_url = $this->plugin->getMoviesUrl($html);

$this->assertTrue(is_array($movies_url));
$this->assertEquals('http://jp.xvideos.com/video9401271/', $movies_url[0]);
$this->assertEquals('http://jp.xvideos.com/video9401309/', $movies_url[1]);
$this->assertEquals('http://www.xvideos.com/video9401271/', $movies_url[0]);
$this->assertEquals('http://www.xvideos.com/video9401309/', $movies_url[1]);
}
}

2 changes: 1 addition & 1 deletion tests/Midnight/Crawler/Plugin/RakuenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,6 @@ public function 動画へのリンクを取得する ()
$movies_url = $this->plugin->getMoviesUrl($html);

$this->assertTrue(is_array($movies_url));
$this->assertEquals('http://jp.xvideos.com/video9475093/', $movies_url[0]);
$this->assertEquals('http://www.xvideos.com/video9475093/', $movies_url[0]);
}
}
2 changes: 1 addition & 1 deletion tests/Midnight/Crawler/Plugin/ShikosenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,6 @@ public function 動画へのリンクを取得する ()
$movies_url = $this->plugin->getMoviesUrl($html);

$this->assertTrue(is_array($movies_url));
$this->assertEquals('http://jp.xvideos.com/video7985646/', $movies_url[0]);
$this->assertEquals('http://www.xvideos.com/video7985646/', $movies_url[0]);
}
}
4 changes: 2 additions & 2 deletions tests/Midnight/Crawler/UriManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function xvideosのembed用urlを整形する場合 ()
$url = $this->manager->resolve($url);

//$this->assertEquals('http://flashservice.xvideos.com/embedframe/7953646', $url);
$this->assertEquals('http://jp.xvideos.com/video7953646/', $url);
$this->assertEquals('http://www.xvideos.com/video7953646/', $url);
}


Expand All @@ -62,7 +62,7 @@ public function 海外向けxvideosのurlを整形する場合 ()
$url = 'http://www.xvideos.com/video7953646/bmw012';
$url = $this->manager->resolve($url);

$this->assertEquals('http://jp.xvideos.com/video7953646/bmw012', $url);
$this->assertEquals('http://www.xvideos.com/video7953646/bmw012', $url);
}


Expand Down

0 comments on commit 32ca266

Please sign in to comment.