diff options
author | Nathan Gass | 2017-08-17 14:58:33 +0200 |
---|---|---|
committer | Nathan Gass | 2017-08-17 14:58:33 +0200 |
commit | ceca2046210c8150f354e5b1e9dc97ff8cf28cb3 (patch) | |
tree | 07dae15fc949c5b0121ca4f08d2fde4c14c60807 | |
parent | 2f68913fecf3a1d7d9b3eedfaeca35665c6372f5 (diff) | |
download | itools-ceca2046210c8150f354e5b1e9dc97ff8cf28cb3.tar.gz itools-ceca2046210c8150f354e5b1e9dc97ff8cf28cb3.tar.bz2 itools-ceca2046210c8150f354e5b1e9dc97ff8cf28cb3.zip |
add tests for authentication
-rwxr-xr-x | tests/it_url.t | 16 |
1 files changed, 16 insertions, 0 deletions
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'], '</html>'), 'it_url::get_multi got first url'); # UTF8SAFE ok(strpos($pages['b'], '</html>'), 'it_url::get_multi got second url'); # UTF8SAFE |