From 160f67d68300cb5bc49f305c16c0d4da5d551821 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 10 Aug 2015 15:58:50 +0200 Subject: adapt tests to strict comparison --- tests/it_url.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/it_url.t') diff --git a/tests/it_url.t b/tests/it_url.t index 711b5f1..c843bba 100755 --- a/tests/it_url.t +++ b/tests/it_url.t @@ -109,7 +109,7 @@ ok( ); is( $url->result, - 200, + '200', '$url->result = 200' ); is( -- cgit v1.2.3 From 21205b1d20a4c0325e3b4484f1501078f6dd6846 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 10 Aug 2015 16:01:12 +0200 Subject: php 5.3 compatibility --- tests/it_url.t | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'tests/it_url.t') diff --git a/tests/it_url.t b/tests/it_url.t index c843bba..0b81881 100755 --- a/tests/it_url.t +++ b/tests/it_url.t @@ -131,7 +131,7 @@ handle_server( is( it_url::get('http://localhost:8000/'), "Testserver root output", - 'it_url::get() static call with port', + 'it_url::get() static call with port' ) ); @@ -139,7 +139,7 @@ handle_server( is( it_url::get(array('url' => 'http://localhost:8000/', 'maxlength' => 100)), "Testserver root output", - 'it_url::get() static call with port and maxlength', + 'it_url::get() static call with port and maxlength' ) ); @@ -147,7 +147,7 @@ handle_server( is( it_url::get(array('url' => 'http://localhost:8000/', 'maxlength' => 5)), false, - 'it_url::get() static call with port and too small maxlength', + 'it_url::get() static call with port and too small maxlength' ) ); @@ -155,7 +155,7 @@ handle_server( is( it_url::get('http://localhost:8000/temp_redirect'), "Testserver output after temporary redirect", - 'it_url::get() follows temproary redirect', + 'it_url::get() follows temproary redirect' ) ); @@ -163,7 +163,7 @@ handle_server( is( it_url::get('http://localhost:8000/perm_redirect'), "Testserver output after permanent redirect", - 'it_url::get() follows permanent redirect', + 'it_url::get() follows permanent redirect' ) ); @@ -171,7 +171,7 @@ handle_server( is( it_url::get('http://localhost:8000/relative_redirect'), "Testserver output after relative redirect", - 'TODO: it_url::get() follows relative redirect correctly', + 'TODO: it_url::get() follows relative redirect correctly' ) ); @@ -179,32 +179,32 @@ handle_server( is( it_url::get('http://localhost:8000/nohost_redirect'), "Testserver output after nohost redirect", - 'TODO: it_url::get() follows redirect without host correctly', + 'TODO: it_url::get() follows redirect without host correctly' ) ); $output = handle_server( ok( !it_url::get(U('http://localhost:8000/redirect_loop', 'num' => 10)), - 'it_url::get() handles redirect loop', + 'it_url::get() handles redirect loop' ) ); $last_num = it::match('num=(\d+)', end($output)); if (!ok( $last_num == 5, - 'it_url::get() aborts redirect loop after 5 redirects', + 'it_url::get() aborts redirect loop after 5 redirects' )) diag($output); $output = handle_server( ok( !it_url::get('url' => 'http://localhost:8000/does_not_exist', 'retries' => 4), - 'it_url::get() retries on empty response', + 'it_url::get() retries on empty response' ) ); if (!ok( count(preg_grep('/^Got Request:/', $output)) == 5, - 'it_url::get() respects set retry count', + 'it_url::get() respects set retry count' )) diag($output); @@ -212,7 +212,7 @@ handle_server( is( it_url::get(U('http://localhost:8000/get_server_value', 'key' => 'HTTP_HOST')), 'localhost:8000', - 'it_url::get() sets correct Host header', + 'it_url::get() sets correct Host header' ) ); @@ -220,14 +220,14 @@ handle_server( is( it_url::get(U('http://localhost:8000/get_server_value', 'key' => 'HTTP_ACCEPT_LANGUAGE')), T_lang(), - 'it_url::get() sets correct Accept-Language header', + 'it_url::get() sets correct Accept-Language header' ) ); handle_server( ok( it::match('Mozilla', it_url::get(U('http://localhost:8000/get_server_value', 'key' => 'HTTP_USER_AGENT'))), - 'it_url::get() sets User-Agent containing Mozilla', + 'it_url::get() sets User-Agent containing Mozilla' ) ); -- cgit v1.2.3 From 28ddc800b720c62fe2acc12e2bce88c0b4efaad8 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 10 Aug 2015 16:04:53 +0200 Subject: php 5.3 compatibility --- tests/it_url.t | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/it_url.t') diff --git a/tests/it_url.t b/tests/it_url.t index 0b81881..514593c 100755 --- a/tests/it_url.t +++ b/tests/it_url.t @@ -185,7 +185,7 @@ handle_server( $output = handle_server( ok( - !it_url::get(U('http://localhost:8000/redirect_loop', 'num' => 10)), + !it_url::get(U('http://localhost:8000/redirect_loop', array('num' => 10))), 'it_url::get() handles redirect loop' ) ); @@ -198,7 +198,7 @@ if (!ok( $output = handle_server( ok( - !it_url::get('url' => 'http://localhost:8000/does_not_exist', 'retries' => 4), + !it_url::get(array('url' => 'http://localhost:8000/does_not_exist', 'retries' => 4)), 'it_url::get() retries on empty response' ) ); @@ -210,7 +210,7 @@ if (!ok( handle_server( is( - it_url::get(U('http://localhost:8000/get_server_value', 'key' => 'HTTP_HOST')), + it_url::get(U('http://localhost:8000/get_server_value', array('key' => 'HTTP_HOST'))), 'localhost:8000', 'it_url::get() sets correct Host header' ) @@ -218,7 +218,7 @@ handle_server( handle_server( is( - it_url::get(U('http://localhost:8000/get_server_value', 'key' => 'HTTP_ACCEPT_LANGUAGE')), + it_url::get(U('http://localhost:8000/get_server_value', array('key' => 'HTTP_ACCEPT_LANGUAGE'))), T_lang(), 'it_url::get() sets correct Accept-Language header' ) @@ -226,7 +226,7 @@ handle_server( handle_server( ok( - it::match('Mozilla', it_url::get(U('http://localhost:8000/get_server_value', 'key' => 'HTTP_USER_AGENT'))), + it::match('Mozilla', it_url::get(U('http://localhost:8000/get_server_value', array('key' => 'HTTP_USER_AGENT')))), 'it_url::get() sets User-Agent containing Mozilla' ) ); -- cgit v1.2.3 From b26fcf8a18d32a49728516d4cdcb41c4f2ae8c93 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 10 Aug 2015 16:06:24 +0200 Subject: php 5.3 compatibility --- tests/it_url.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/it_url.t') diff --git a/tests/it_url.t b/tests/it_url.t index 514593c..5cb2b29 100755 --- a/tests/it_url.t +++ b/tests/it_url.t @@ -231,7 +231,7 @@ handle_server( ) ); -$pages = it_url::get_multi('urls' => array('a' => 'http://www.gna.ch/', 'b' => 'http://search.ch/')); +$pages = it_url::get_multi(array('urls' => array('a' => 'http://www.gna.ch/', 'b' => 'http://search.ch/'))); ok(strpos($pages['a'], ''), 'it_url::get_multi got first url'); # UTF8SAFE ok(strpos($pages['b'], ''), 'it_url::get_multi got second url'); # UTF8SAFE is(count($pages), 2, 'it_url::get_multi no additional array elements'); -- cgit v1.2.3