6 use Test
::More tests
=> 22;
7 BEGIN { use_ok
('Number::Phone::RO') };
13 note
"Now working with the number $num";
14 $nr = Number
::Phone
::RO
->new($num);
18 ok
!defined $nr, 'Constructor returns undef';
21 ok
$nr->is_geographic, 'is_geographic';
22 ok
$nr->is_fixed_line, 'is_fixed_line';
23 ok
!$nr->is_mobile, '!is_mobile';
24 ok
!$nr->is_tollfree, 'is_tollfree';
25 ok
!$nr->is_specialrate, 'is_specialrate';
26 is
$nr->areacode, '350', 'areacode';
27 is
$nr->areaname, 'Vâlcea', 'areaname';
28 is
$nr->subscriber, '123456', 'subscriber';
29 is
$nr->format, '+40 350 123 456', 'format';
32 is
$nr->areacode, '21', 'areacode';
33 is
$nr->subscriber, '1234567', 'subscriber';
34 is
$nr->format, '+40 21 123 4567', 'format';
37 is
$nr->intra_country_dial_to, '0800123123', 'intra_country_dial_to';
38 ok
$nr->is_tollfree, 'is_tollfree';
39 is
$nr->country_code, 40, 'country_code';
40 like
$nr->regulator, qr/ANCOM/, 'regulator';
41 ok
!defined $nr->areaname, 'areaname is undef';
44 ok
$nr->is_adult, 'is_adult';
47 ok
$nr->is_mobile, 'is_mobile';
48 ok
!$nr->is_fixed_line, 'is_fixed_line';
This page took 0.025032 seconds and 4 git commands to generate.