consistent
This commit is contained in:
parent
adaaaef3c2
commit
b26bd7c6c5
@ -92,7 +92,7 @@ class CrawlerTest extends TestCase{
|
|||||||
'http://localhost:8080/interlinked2' => 1,
|
'http://localhost:8080/interlinked2' => 1,
|
||||||
'http://localhost:8080/interlinked3' => 1,
|
'http://localhost:8080/interlinked3' => 1,
|
||||||
]],
|
]],
|
||||||
]);
|
], print_r($sitemap,true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRedirectToFound(){
|
public function testRedirectToFound(){
|
||||||
@ -102,7 +102,7 @@ class CrawlerTest extends TestCase{
|
|||||||
$this->assertTreeContains($sitemap,[
|
$this->assertTreeContains($sitemap,[
|
||||||
'http://localhost:8080/redirectToFound' => ['code' => 302],
|
'http://localhost:8080/redirectToFound' => ['code' => 302],
|
||||||
'http://localhost:8080/found' => ['code' => 200 ],
|
'http://localhost:8080/found' => ['code' => 200 ],
|
||||||
]);
|
], print_r($sitemap,true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRedirectToNotFound(){
|
public function testRedirectToNotFound(){
|
||||||
@ -112,7 +112,7 @@ class CrawlerTest extends TestCase{
|
|||||||
$this->assertTreeContains($sitemap,[
|
$this->assertTreeContains($sitemap,[
|
||||||
'http://localhost:8080/redirectToNotFound' => ['code' => 302],
|
'http://localhost:8080/redirectToNotFound' => ['code' => 302],
|
||||||
'http://localhost:8080/notFound' => ['code' => 404 ],
|
'http://localhost:8080/notFound' => ['code' => 404 ],
|
||||||
]);
|
], print_r($sitemap,true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRedirectToRedirectToNotFound(){
|
public function testRedirectToRedirectToNotFound(){
|
||||||
@ -123,7 +123,7 @@ class CrawlerTest extends TestCase{
|
|||||||
'http://localhost:8080/redirectToRedirectToNotFound' => ['code' => 302],
|
'http://localhost:8080/redirectToRedirectToNotFound' => ['code' => 302],
|
||||||
'http://localhost:8080/redirectToNotFound' => ['code' => 302],
|
'http://localhost:8080/redirectToNotFound' => ['code' => 302],
|
||||||
'http://localhost:8080/notFound' => ['code' => 404],
|
'http://localhost:8080/notFound' => ['code' => 404],
|
||||||
]);
|
], print_r($sitemap,true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTwoRedirectsToSameLocation(){
|
public function testTwoRedirectsToSameLocation(){
|
||||||
@ -135,7 +135,7 @@ class CrawlerTest extends TestCase{
|
|||||||
'http://localhost:8080/redirect1' => ['code' => 302],
|
'http://localhost:8080/redirect1' => ['code' => 302],
|
||||||
'http://localhost:8080/redirect2' => ['code' => 302],
|
'http://localhost:8080/redirect2' => ['code' => 302],
|
||||||
'http://localhost:8080/found' => ['code' => 200],
|
'http://localhost:8080/found' => ['code' => 200],
|
||||||
]);
|
], print_r($sitemap,true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTimeout(){
|
public function testTimeout(){
|
||||||
@ -144,7 +144,7 @@ class CrawlerTest extends TestCase{
|
|||||||
$sitemap=$crawler->getResults();
|
$sitemap=$crawler->getResults();
|
||||||
$this->assertTreeContains($sitemap,[
|
$this->assertTreeContains($sitemap,[
|
||||||
'http://localhost:8080/timeout' => ['code' => '---'],
|
'http://localhost:8080/timeout' => ['code' => '---'],
|
||||||
]);
|
], print_r($sitemap,true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRedirectLoop(){
|
public function testRedirectLoop(){
|
||||||
@ -153,7 +153,7 @@ class CrawlerTest extends TestCase{
|
|||||||
$sitemap=$crawler->getResults();
|
$sitemap=$crawler->getResults();
|
||||||
$this->assertTreeContains($sitemap,[
|
$this->assertTreeContains($sitemap,[
|
||||||
'http://localhost:8080/redirectLoop' => ['code' => '---'],
|
'http://localhost:8080/redirectLoop' => ['code' => '---'],
|
||||||
]);
|
], print_r($sitemap,true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInternalServerError(){
|
public function testInternalServerError(){
|
||||||
@ -162,7 +162,7 @@ class CrawlerTest extends TestCase{
|
|||||||
$sitemap=$crawler->getResults();
|
$sitemap=$crawler->getResults();
|
||||||
$this->assertTreeContains($sitemap,[
|
$this->assertTreeContains($sitemap,[
|
||||||
'http://localhost:8080/internalServerError' => ['code' => 500],
|
'http://localhost:8080/internalServerError' => ['code' => 500],
|
||||||
]);
|
], print_r($sitemap,true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function assertTreeContains($haystack, $contains, $crumbs=''){
|
public function assertTreeContains($haystack, $contains, $crumbs=''){
|
||||||
|
Loading…
Reference in New Issue
Block a user