| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Test::Mock::Mango::FakeData; |
|
2
|
|
|
|
|
|
|
|
|
3
|
19
|
|
|
19
|
|
215
|
use v5.10; |
|
|
19
|
|
|
|
|
60
|
|
|
|
19
|
|
|
|
|
823
|
|
|
4
|
19
|
|
|
19
|
|
108
|
use strict; |
|
|
19
|
|
|
|
|
46
|
|
|
|
19
|
|
|
|
|
578
|
|
|
5
|
19
|
|
|
19
|
|
112
|
use warnings; |
|
|
19
|
|
|
|
|
45
|
|
|
|
19
|
|
|
|
|
925
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
|
8
|
|
|
|
|
|
|
|
|
9
|
19
|
|
|
19
|
|
105
|
use Mango::BSON qw(bson_time); |
|
|
19
|
|
|
|
|
30
|
|
|
|
19
|
|
|
|
|
3878
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
|
12
|
19
|
|
|
19
|
0
|
382
|
bless { |
|
13
|
|
|
|
|
|
|
collection => [ |
|
14
|
|
|
|
|
|
|
{ |
|
15
|
|
|
|
|
|
|
_id => 'ABCDEFG-123456', |
|
16
|
|
|
|
|
|
|
name => 'Homer Simpson', |
|
17
|
|
|
|
|
|
|
job => 'Safety Inspector', |
|
18
|
|
|
|
|
|
|
dob => '1956-03-01', |
|
19
|
|
|
|
|
|
|
hair => 'none', |
|
20
|
|
|
|
|
|
|
}, |
|
21
|
|
|
|
|
|
|
{ |
|
22
|
|
|
|
|
|
|
_id => 'ABCDEFG-124343', |
|
23
|
|
|
|
|
|
|
name => 'Marge Simpson', |
|
24
|
|
|
|
|
|
|
job => 'Home Maker', |
|
25
|
|
|
|
|
|
|
dob => '1956-10-01', |
|
26
|
|
|
|
|
|
|
hair => 'blue', |
|
27
|
|
|
|
|
|
|
}, |
|
28
|
|
|
|
|
|
|
{ |
|
29
|
|
|
|
|
|
|
_id => 'BARTSC-12434', |
|
30
|
|
|
|
|
|
|
name => 'Bart Simpson', |
|
31
|
|
|
|
|
|
|
job => 'Hell Raiser', |
|
32
|
|
|
|
|
|
|
dob => '1979-04-01', |
|
33
|
|
|
|
|
|
|
hair => 'yellow', |
|
34
|
|
|
|
|
|
|
}, |
|
35
|
|
|
|
|
|
|
{ |
|
36
|
|
|
|
|
|
|
_id => 'LISASC-12434', |
|
37
|
|
|
|
|
|
|
name => 'Lisa Simpson', |
|
38
|
|
|
|
|
|
|
job => 'Know it all', |
|
39
|
|
|
|
|
|
|
dob => '1981-09-28', |
|
40
|
|
|
|
|
|
|
hair => 'yellow', |
|
41
|
|
|
|
|
|
|
}, |
|
42
|
|
|
|
|
|
|
{ |
|
43
|
|
|
|
|
|
|
_id => 'MAGGIE-12434', |
|
44
|
|
|
|
|
|
|
name => 'Maggie Simpson', |
|
45
|
|
|
|
|
|
|
job => 'Ticking timebomb', |
|
46
|
|
|
|
|
|
|
dob => '1986-11-05', |
|
47
|
|
|
|
|
|
|
hair => 'yellow', |
|
48
|
|
|
|
|
|
|
}, |
|
49
|
|
|
|
|
|
|
] |
|
50
|
|
|
|
|
|
|
}, shift; |
|
51
|
|
|
|
|
|
|
} |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=encoding utf8 |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 NAME |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Test::Mock::Mango::FakeData - pretends to be data to be returned from mango calls |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
my $data = Test::Mock::Mango::FakeData->new; |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Object to hold known data that will be returned by test calls. |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |