EPP/Test/CNic.pm

filter: Statementstmt 100% 21 / 21 Branchbran 100% 2 / 2 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 2 totaltotal 94.4% 34 / 36 SCAR 11.0
CC
3
Cov
100%
req
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« EPP/Test/Server.pm ↑ Summary EPP.pm »
1 package IO::EPP::Test::CNic;
2  
3 =encoding utf8
4  
5 =head1 NAME
6  
7 IO::EPP::Test::CNic
8  
9 =head1 SYNOPSIS
10  
11 Call IO::EPP::CNic with parameter "test_mode=1"
12  
13 =head1 DESCRIPTION
14  
15 Module for testing IO::EPP::CNic,
16 emulates answers of CentralNic server
17  
18 =head1 AUTHORS
19  
20 Vadim Likhota <vadiml@cpan.org>
21  
22 =cut
23  
24 1 ▶use IO::EPP::Test::Base;
Subroutine BEGIN: called CC=1 SCAR=0.0
25  
26 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
28  
29 1 ▶no utf8; # !!!
Subroutine BEGIN: called CC=1 SCAR=0.0
30  
31 sub req {
32 8 ▶ my ( $obj, $out_data, undef ) = @_;
Subroutine req: called CC=3 SCAR=11.0
Pod undocumented
33  
34 8 my $in_data;
35  
36 8 ▶ if ( !$out_data or $out_data =~ m|<hello[^<>]+/>| ) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $out_data or $out_data =~ m[<hello[^<>]+/>]) { } 3 5 8
Condition100%3/3
not $out_data or $out_data =~ m[<hello[^<>]+/>]
l!l&&r!l&&!r
215
MC/DC100%2/2
not $out_data or $out_data =~ m[<hello[^<>]+/>]
not $out_data $out_data =~ m[<hello[^<>]+/>]
Truth table100%3/3
not(A) or B
A= not $out_dataB= $out_data =~ m[<hello[^<>]+/>]
ABresult
1X1
011
000
37 3 $in_data = hello( $out_data );
38 }
39 else {
40 5 return IO::EPP::Test::Base::req( @_ );
41 }
42  
43 3 return $in_data;
44 }
45  
46  
47 sub hello {
48 3 ▶ my $dt = IO::EPP::Test::Base::get_dates();
Subroutine hello: called CC=1 SCAR=0.0
Pod undocumented
49  
50 3 return qq|<?xml version="1.0" encoding="UTF-8" standalone="no"?><epp xmlns="urn:ietf:params:xml:ns:epp-1.0"><greeting><svID>CentralNic EPP server EPP.CENTRALNIC.COM</svID><svDate>$dt</svDate><svcMenu><version>1.0</version><lang>en</lang><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><svcExtension><extURI>urn:ietf:params:xml:ns:rgp-1.0</extURI><extURI>urn:ietf:params:xml:ns:secDNS-1.1</extURI><extURI>urn:ietf:params:xml:ns:idn-1.0</extURI><extURI>urn:ietf:params:xml:ns:fee-0.4</extURI><extURI>urn:ietf:params:xml:ns:fee-0.5</extURI><extURI>urn:ietf:params:xml:ns:launch-1.0</extURI><extURI>urn:ietf:params:xml:ns:regtype-0.1</extURI><extURI>urn:ietf:params:xml:ns:auxcontact-0.1</extURI><extURI>urn:ietf:params:xml:ns:artRecord-0.2</extURI><extURI>http://www.nic.coop/contactCoopExt-1.0</extURI></svcExtension></svcMenu><dcp><access><all></all></access><statement><purpose><admin></admin><prov></prov></purpose><recipient><ours></ours><public></public></recipient><retention><stated></stated></retention></statement></dcp></greeting></epp>|;
51 }
52  
53 1 1;
« EPP/Test/Server.pm ↑ Summary EPP.pm »