Test Failed
Push — master ( d8d5ef...b9f7fc )
by mcfog
01:56
created

AbstractMiddlewareTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testMiddleware() 0 15 1
1
<?php namespace Nimo\Tests;
2
3
/**
4
 * User: mcfog
5
 * Date: 15/9/13
6
 */
7
8
use Nimo\AbstractMiddleware;
9
10
class AbstractMiddlewareTest extends NimoTestCase
11
{
12
    public function testMiddleware()
13
    {
14
        $answerRes = $this->getResponseMock();
15
        $req = $this->getRequestMock();
16
17
        $middleware = $this->getMockForAbstractClass(AbstractMiddleware::class);
18
        $middleware->expects(self::any())
19
            ->method('main')
20
            ->willReturn($answerRes);
21
22
        /** @noinspection PhpParamsInspection */
23
        $returnValue = $middleware->process($req, $this->throwHandler());
24
25
        $this->assertSame($answerRes, $returnValue);
26
    }
27
28
}
29