AbstractEndpointTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 34
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 5 1
A shouldGenerateWsseHeaderIfRequestIsSecured() 0 9 1
1
<?php
2
3
/*
4
 * This file is part of the AMFWebServicesClientBundle package.
5
 *
6
 * (c) Amine Fattouch <http://github.com/fattouchsquall>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Tests\Soap;
13
14
use AMF\WebServicesClientBundle\Soap\AbstractEndpoint;
15
use AMF\WebServicesClientBundle\Soap\Security\Wsse;
16
17
/**
18
 * Test suite for Endpoint class.
19
 *
20
 * @author Mohamed Amine Fattouch <[email protected]>
21
 */
22
class AbstractEndpointTest extends \PHPUnit_Framework_TestCase
23
{
24
    /**
25
     * @var \Phake_IMock
26
     */
27
    private $soapClient;
28
29
    /**
30
     * @var \Phake_IMock
31
     */
32
    private $wsse;
33
34
    /**
35
     * Setups current tests.
36
     */
37
    public function setUp()
38
    {
39
        $this->soapClient = \Phake::mock(\SoapClient::class);
40
        $this->wsse       = \Phake::mock(Wsse::class);
41
    }
42
43
    /**
44
     * @test
45
     */
46
    public function shouldGenerateWsseHeaderIfRequestIsSecured()
47
    {
48
        $endpoint = \Phake::partialMock(AbstractEndpoint::class, $this->soapClient, $this->wsse, true);
49
50
        $endpoint->call($this->anything(), []);
0 ignored issues
show
Bug introduced by
The method call() does not seem to exist on object<Phake_IMock>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
51
52
        \Phake::verify($this->wsse)->generateHeader();
53
        \Phake::verify($this->soapClient)->__setSoapHeaders($this->anything());
54
    }
55
}
56