diff options
author | Nathan Gass | 2023-10-30 18:33:57 +0100 |
---|---|---|
committer | Nathan Gass | 2023-10-30 18:33:57 +0100 |
commit | 91533227118a88798d27c2266a8f60298e71ae1b (patch) | |
tree | 3115bba977468ad36fdb2c92ca3d2bcd986efc15 | |
parent | f75da376ff31eed20e409797260ba832be3b9308 (diff) | |
download | itools-91533227118a88798d27c2266a8f60298e71ae1b.tar.gz itools-91533227118a88798d27c2266a8f60298e71ae1b.tar.bz2 itools-91533227118a88798d27c2266a8f60298e71ae1b.zip |
add test that redirect loop is not reachable
-rwxr-xr-x | test/it_url.t | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/it_url.t b/test/it_url.t index 192db26..a7e1ce3 100755 --- a/test/it_url.t +++ b/test/it_url.t @@ -131,10 +131,12 @@ is( ); $_SERVER['PHP_SELF'] = $php_self; +require 'it_url_server.php'; is(it_url::is_reachable('http://www.gna.ch/'), true, "is_reachable('http://www.gna.ch/')"); is(it_url::is_reachable('http://www.search.ch/not_found'), false, "is_reachable('http://www.search.ch/not_found')"); is(it_url::is_reachable('http://bogus.url'), false, "is_reachable('http://bogus.url')"); +is(it_url::is_reachable(U('http://localhost:8000/redirect_loop', ['num' => 40])), false, "redirect loop is not reachable"); $response = it_url::get(['url' => 'http://www.gna.ch/', 'assoc' => true]); ok( @@ -158,8 +160,6 @@ ok( 'it_url::get() static call' ); -require 'it_url_server.php'; - handle_server( is( it_url::get('http://localhost:8000/'), |