WsseTest::shouldGenerateAHeaderForWsse()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
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\Security;
13
14
use AMF\WebServicesClientBundle\Soap\Security\Wsse;
15
16
/**
17
 * Test suite for Endpoint class.
18
 *
19
 * @author Amine Fattouch <[email protected]>
20
 */
21
class WsseTest extends \PHPUnit_Framework_TestCase
22
{
23
    /**
24
     * @test
25
     */
26
    public function shouldThrowAnExceptionIfUsernameAndPasswordAreNotProvided()
27
    {
28
        $this->expectException(\Exception::class);
29
30
        $wsse = \Phake::partialMock(Wsse::class, null, null);
31
32
        $wsse->generateHeader();
0 ignored issues
show
Bug introduced by
The method generateHeader() 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...
33
    }
34
35
    /**
36
     * @test
37
     */
38
    public function shouldGenerateAHeaderForWsse()
39
    {
40
        $wsse = \Phake::partialMock(Wsse::class, 'test', 'test');
41
42
        $this->assertInstanceOf(\SoapHeader::class, $wsse->generateHeader());
0 ignored issues
show
Bug introduced by
The method generateHeader() 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...
43
    }
44
}
45