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

AbstractMiddlewareTest::testMiddleware()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 9
nc 1
nop 0
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