ServerCompletePurchaseResponseTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testHasSendMethod() 0 5 1
A getNewResponse() 0 5 1
1
<?php
2
3
namespace ByTIC\Payments\Mobilpay\Tests\Message;
4
5
use ByTIC\Payments\Mobilpay\Message\ServerCompletePurchaseRequest;
6
use ByTIC\Payments\Mobilpay\Message\ServerCompletePurchaseResponse;
7
use ByTIC\Payments\Mobilpay\Tests\AbstractTest;
8
use Symfony\Component\HttpFoundation\Request;
9
10
/**
11
 * Class ServerCompletePurchaseResponseTest
12
 * @package ByTIC\Payments\Mobilpay\Tests\Message
13
 */
14
class ServerCompletePurchaseResponseTest extends AbstractTest
15
{
16
    public function testHasSendMethod()
17
    {
18
        $response = $this->getNewResponse();
19
20
        static::assertTrue(method_exists($response, 'send'));
21
    }
22
23
    /**
24
     * @return ServerCompletePurchaseResponse
25
     */
26
    protected function getNewResponse()
27
    {
28
        $request = new ServerCompletePurchaseRequest($this->client, new Request());
29
30
        return new ServerCompletePurchaseResponse($request, []);
31
    }
32
}
33