UnitTestCase   A
last analyzed

Complexity

Total Complexity 11

Size/Duplication

Total Lines 88
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
c 1
b 0
f 0
dl 0
loc 88
rs 10
wmc 11

11 Methods

Rating   Name   Duplication   Size   Complexity  
A mockHttpHandler() 0 3 1
A mockPromise() 0 3 1
A mockTransaction() 0 3 1
A mockResponse() 0 3 1
A mockRequest() 0 3 1
A mockCompleteEvent() 0 3 1
A mockErrorEvent() 0 3 1
A mockHttpClient() 0 3 1
A mockStream() 0 3 1
A mockBeforeEvent() 0 3 1
A mockMessageFactory() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of Guzzle HTTP JSON-RPC
5
 *
6
 * Copyright (c) 2014 Nature Delivered Ltd. <http://graze.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 * @see  http://github.com/graze/guzzle-jsonrpc/blob/master/LICENSE
12
 * @link http://github.com/graze/guzzle-jsonrpc
13
 */
14
15
namespace Graze\GuzzleHttp\JsonRpc\Test;
16
17
use Mockery;
18
use PHPUnit_Framework_TestCase as TestCase;
19
20
class UnitTestCase extends TestCase
21
{
22
    /**
23
     * @return Mockery\MockInterface
24
     */
25
    protected function mockBeforeEvent()
26
    {
27
        return Mockery::mock('GuzzleHttp\Event\BeforeEvent');
28
    }
29
30
    /**
31
     * @return Mockery\MockInterface
32
     */
33
    protected function mockCompleteEvent()
34
    {
35
        return Mockery::mock('GuzzleHttp\Event\CompleteEvent');
36
    }
37
38
    /**
39
     * @return Mockery\MockInterface
40
     */
41
    protected function mockErrorEvent()
42
    {
43
        return Mockery::mock('GuzzleHttp\Event\ErrorEvent');
44
    }
45
46
    /**
47
     * @return Mockery\MockInterface
48
     */
49
    protected function mockHttpClient()
50
    {
51
        return Mockery::mock('GuzzleHttp\ClientInterface');
52
    }
53
54
    /**
55
     * @return Mockery\MockInterface
56
     */
57
    protected function mockHttpHandler()
58
    {
59
        return Mockery::mock('GuzzleHttp\HandlerStack');
60
    }
61
62
    /**
63
     * @return Mockery\MockInterface
64
     */
65
    protected function mockMessageFactory()
66
    {
67
        return Mockery::mock('Graze\GuzzleHttp\JsonRpc\Message\MessageFactoryInterface');
68
    }
69
70
    /**
71
     * @return Mockery\MockInterface
72
     */
73
    protected function mockPromise()
74
    {
75
        return Mockery::mock('GuzzleHttp\Promise\PromiseInterface');
76
    }
77
78
    /**
79
     * @return Mockery\MockInterface
80
     */
81
    protected function mockRequest()
82
    {
83
        return Mockery::mock('Graze\GuzzleHttp\JsonRpc\Message\RequestInterface');
84
    }
85
86
    /**
87
     * @return Mockery\MockInterface
88
     */
89
    protected function mockResponse()
90
    {
91
        return Mockery::mock('Graze\GuzzleHttp\JsonRpc\Message\ResponseInterface');
92
    }
93
94
    /**
95
     * @return Mockery\MockInterface
96
     */
97
    protected function mockStream()
98
    {
99
        return Mockery::mock('GuzzleHttp\Stream\StreamInterface');
100
    }
101
102
    /**
103
     * @return Mockery\MockInterface
104
     */
105
    protected function mockTransaction()
106
    {
107
        return Mockery::mock('GuzzleHttp\Adapter\TransactionInterface');
108
    }
109
}
110