From 91533227118a88798d27c2266a8f60298e71ae1b Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Mon, 30 Oct 2023 18:33:57 +0100 Subject: add test that redirect loop is not reachable --- test/it_url.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') 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/'), -- cgit v1.2.3