From 52239c6482d10cbea631befd8f96b74425731b72 Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Mon, 26 Mar 2012 15:41:08 +0000 Subject: make get and get_multi tests encoding agnostic --- tests/it_url.t | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/tests/it_url.t b/tests/it_url.t index e8507aa..ee683ce 100755 --- a/tests/it_url.t +++ b/tests/it_url.t @@ -87,25 +87,22 @@ is( $url = new it_url('http://www.gna.ch/'); $page = $url->get(); -is( - it::match('()', $page), - '', +ok( + strpos($page, ''), #UTF8SAFE '$url->get with url in constructor' ); $url = new it_url('http://bogus.url'); $page = $url->get('http://www.gna.ch/'); -is( - it::match('()', $page), - '', +ok( + strpos($page, ''), #UTF8SAFE '$url->get(url) with url as string arg' ); $url = new it_url('http://bogus.url'); $page = $url->get(array('url' => 'http://www.gna.ch/')); -is( - it::match('()', $page), - '', +ok( + strpos($page, ''), #UTF8SAFE '$url->get(\'url\' => url) with url as named arg' ); is( @@ -121,15 +118,14 @@ is( unset($url, $page); $page = it_url::get('http://www.gna.ch/'); -is( - it::match('()', $page), - '', +ok( + strpos($page, ''), #UTF8SAFE 'it_url::get() static call' ); $pages = it_url::get_multi('urls' => array('a' => 'http://www.gna.ch/', 'b' => 'http://search.ch/')); -ok(it::match('', $pages['a']), 'it_url::get_multi got first url'); -ok(it::match('', $pages['b']), 'it_url::get_multi got second url'); +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