From ceca2046210c8150f354e5b1e9dc97ff8cf28cb3 Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Thu, 17 Aug 2017 14:58:33 +0200 Subject: add tests for authentication --- tests/it_url.t | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/it_url.t') diff --git a/tests/it_url.t b/tests/it_url.t index 379a4cb..d2fbae0 100755 --- a/tests/it_url.t +++ b/tests/it_url.t @@ -279,6 +279,22 @@ handle_server( ) ); +handle_server( + is( + it_url::get(U('http://user:password@localhost:8000/get_server_value', array('key' => 'PHP_AUTH_USER'))), + 'user', + 'it_url::get() basic authentication user' + ) +); + +handle_server( + is( + it_url::get(U('http://user:password@localhost:8000/get_server_value', array('key' => 'PHP_AUTH_PW'))), + 'password', + 'it_url::get() basic authentication password' + ) +); + $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 -- cgit v1.2.3