mirror of
https://github.com/gtbu/Typesetter-5.3-p8.git
synced 2024-11-22 14:19:14 +01:00
29 lines
553 B
PHP
29 lines
553 B
PHP
<?php
|
|
|
|
namespace phpunit\Admin;
|
|
|
|
class MissingTest extends \gptest_bootstrap{
|
|
|
|
public function test404(){
|
|
|
|
$this->UseAnon();
|
|
|
|
$url = \gp\tool::GetUrl( 'a-missing-page','',false);
|
|
self::GuzzleRequest('GET',$url,404);
|
|
|
|
}
|
|
|
|
public function testRedir(){
|
|
|
|
$this->UseAnon();
|
|
|
|
$options = ['allow_redirects'=>false];
|
|
$url = \gp\tool::GetUrl( 'Child_Pag','',false);
|
|
$response = self::GuzzleRequest('GET', $url, 302, $options);
|
|
$location = $response->getHeader('Location');
|
|
|
|
$this->AssertEquals($location[0],'/index.php/Child_Page');
|
|
|
|
}
|
|
|
|
}
|