Typesetter-Original-gtbu/phpunit/Settings/MissingTest.php
2021-09-08 19:52:21 +02:00

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');
}
}