KiokuDB/Test/Fixture/Unicode.pm

filter: Statementstmt 100% 38 / 38 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 12 / 12 Podpod 0.0% 0 / 2 totaltotal 96.1% 50 / 52 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« KiokuDB/TypeMap/Default.pm ↑ Summary KiokuDB/Test/Fixture/RootSet.pm »
1 #!/usr/bin/perl
2  
3 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package KiokuDB::Test::Fixture::Unicode;
6 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use Encode;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use Test::More;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 ▶use KiokuDB::Test::Person;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 2 ▶use KiokuDB::Test::Employee;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 2 ▶use KiokuDB::Test::Company;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 2 ▶use namespace::clean -except => 'meta';
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 2 ▶use constant required_backend_roles => qw(UnicodeSafe);
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 2 with qw(KiokuDB::Test::Fixture) => { excludes => 'required_backend_roles' };
20  
21 2 my $unicode = "משה";
22  
23 sub create {
24  
25 return (
26 33 ▶ KiokuDB::Test::Person->new(
Subroutine create: called CC=1 SCAR=0.0
Pod undocumented
27 name => $unicode,
28 ),
29 );
30 }
31  
32 sub verify {
33 33 ▶ my $self = shift;
Subroutine verify: called CC=1 SCAR=0.0
Pod undocumented
34  
35 $self->txn_lives(sub {
36 33 ▶ my $dec = $self->lookup_ok( @{ $self->populate_ids } );
Subroutine __ANON__: called CC=1 SCAR=0.0
37  
38 33 isa_ok( $dec, "KiokuDB::Test::Person" );
39  
40 33 ok( Encode::is_utf8($dec->name), "preserved is_utf8" );
41 25 is( $dec->name, $unicode, "correct value" );
42 33 });
43 }
44 2 __PACKAGE__
45  
46 __END__
« KiokuDB/TypeMap/Default.pm ↑ Summary KiokuDB/Test/Fixture/RootSet.pm »