Debian Codegraph @

t/null-empty.t

raw
1 # $Id: null-empty.t,v 1.2 2006-04-21 20:59:08 Daddy Exp $
2
3 use ExtUtils::testlib;
4 use Test::More 'no_plan';
5
6 my $sMod;
7 BEGIN
8 {
9 $sMod = 'WWW::Search::Null::Empty';
10 use_ok('WWW::Search');
11 use_ok($sMod);
12 } # end of BEGIN block
13 ok(my $iCount = 4);
14 ok(my $oSearch = new WWW::Search('Null::Empty'));
15 isa_ok($oSearch, $sMod);
16 $oSearch->native_query('Makes no difference what you search for...');
17 my @aoResults = $oSearch->results;
18 is(scalar(@aoResults), 0, 'got zero results');
19 is($oSearch->approximate_result_count, 0, 'got the right approx_results');
20 # ...But you get an HTTP::Response object with a code of 200
21 my $oResponse = $oSearch->response;
22 is($oResponse->code, 200, 'response code');
23 ok($oResponse->is_success, 'HTTP::Response is success');
24
25 __END__