line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Mock::Furl::Response; |
2
|
6
|
|
|
6
|
|
34513
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
198
|
|
3
|
6
|
|
|
6
|
|
30
|
use warnings; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
149
|
|
4
|
6
|
|
|
6
|
|
1047
|
use Test::MockObject; |
|
6
|
|
|
|
|
4347
|
|
|
6
|
|
|
|
|
34
|
|
5
|
6
|
|
|
6
|
|
1195
|
use parent 'Exporter'; |
|
6
|
|
|
|
|
390
|
|
|
6
|
|
|
|
|
31
|
|
6
|
|
|
|
|
|
|
our @EXPORT = qw/$Mock_furl_res $Mock_furl_resp $Mock_furl_response/; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $Mock_furl_res; |
9
|
|
|
|
|
|
|
our $Mock_furl_resp; |
10
|
|
|
|
|
|
|
our $Mock_furl_response; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
BEGIN { |
13
|
6
|
|
|
6
|
|
958
|
$Mock_furl_response = $Mock_furl_resp = $Mock_furl_res = Test::MockObject->new; |
14
|
6
|
|
|
|
|
57
|
$Mock_furl_res->fake_module('Furl::Response'); |
15
|
6
|
|
|
|
|
229
|
$Mock_furl_res->fake_new('Furl::Response'); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our %Headers; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
$Mock_furl_res->mock( |
21
|
|
|
|
|
|
|
'header' => sub { |
22
|
|
|
|
|
|
|
return $Headers{$_[1]}; |
23
|
|
|
|
|
|
|
}, |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
$Mock_furl_res->set_always('code' => 200); |
26
|
|
|
|
|
|
|
$Mock_furl_res->set_always('content' => ''); |
27
|
|
|
|
|
|
|
$Mock_furl_res->set_always('is_success' => 1); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
package # hide from PAUSE |
30
|
|
|
|
|
|
|
Furl::Response; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
our $VERSION = 'Mocked'; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |