File Coverage

blib/lib/Data/Semantic/URI/http_TEST.pm
Criterion Covered Total %
statement 28 28 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 1 1 100.0
total 37 37 100.0


line stmt bran cond sub pod time code
1 1     1   26366 use 5.008;
  1         8  
  1         55  
2 1     1   7 use strict;
  1         2  
  1         39  
3 1     1   6 use warnings;
  1         2  
  1         72  
4              
5             package Data::Semantic::URI::http_TEST;
6             our $VERSION = '1.100850';
7             # ABSTRACT: Test companion class for the http URI semantic data class
8 1     1   6 use Test::More;
  1         3  
  1         12  
9 1     1   1669 use Test::Differences;
  1         14116  
  1         113  
10 1         11 use parent qw(
11             Data::Semantic::Test
12             Data::Semantic::URI::TestData::http
13 1     1   11 );
  1         2  
14 1     1   78 use constant PLAN => 2;
  1         3  
  1         211  
15              
16             sub run {
17 1     1 1 926 my $self = shift;
18 1         15 $self->SUPER::run(@_);
19 1         9116 my $obj = $self->make_real_object(keep => 1);
20 1         213 my $uri = 'http://use.perl.org:8081/~hanekomu/journal?entry=12345';
21 1         7 ok($obj->is_valid($uri), "$uri is valid");
22 1         939 my %expect = (
23             abspath_full => '/~hanekomu/journal?entry=12345',
24             URI => $uri,
25             abspath_no_query => '~hanekomu/journal',
26             query => 'entry=12345',
27             abspath_full_no_slash => '~hanekomu/journal?entry=12345',
28             scheme => 'http',
29             port => '8081',
30             host => 'use.perl.org'
31             );
32 1         6 eq_or_diff({ $obj->kept }, \%expect, 'kept values');
33             }
34             1;
35              
36              
37             __END__