From 2efc485bc24fd66938d3eb5feb542ed4279a9501 Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Mon, 15 Oct 2012 16:04:28 +0000 Subject: add harder tests for it_url::get using custom testserver on localhost --- tests/it_url.testserver.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/it_url.testserver.php (limited to 'tests/it_url.testserver.php') diff --git a/tests/it_url.testserver.php b/tests/it_url.testserver.php new file mode 100644 index 0000000..c9c5dff --- /dev/null +++ b/tests/it_url.testserver.php @@ -0,0 +1,21 @@ + 'temporary')), 'temporary'); + +} else if ($_SERVER['PHP_SELF'] == "/perm_redirect") { + it_url::redirect(U("redirect_target", array('type' => 'permanent')), 'permanent'); + +} else if ($_SERVER['PHP_SELF'] == "/redirect_loop") { + if ($_REQUEST['num'] > 0) + it_url::redirect(U("redirect_loop", array('num' => $_REQUEST['num'] - 1))); + +} else if ($_SERVER['PHP_SELF'] == "/redirect_target") { + echo 'Testserver output after ' . $_REQUEST['type'] . ' redirect'; +} -- cgit v1.2.3