Completed
Push — master ( ea9ffc...4b17ca )
by Daniel
19:33
created

RestControllerTest::testHandle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 16
rs 9.4285
cc 1
eloc 8
nc 1
nop 0
1
<?php
2
3
namespace ApiBundle\Tests\Controller;
4
5
use ApiBundle\Controller\RestController;
6
use Symfony\Component\HttpFoundation\Response;
7
8
class RestControllerTest extends \PHPUnit_Framework_TestCase
9
{
10
    public function testHandle()
11
    {
12
        $mock = $this->getMockForAbstractClass(RestController::class);
13
        $mock->expects($this->any())
14
            ->method('handle')
15
            ->will($this->returnValue(new Response()));
16
        $param = $this->getMock('Application\Domain\ValueObjectInterface');
17
18
        /**
19
         * @var $mock \ApiBundle\Controller\RestController
20
         * @var $param \Application\Domain\ValueObjectInterface
21
         */
22
        $response = $mock->handle($param);
23
24
        $this->assertInstanceOf(Response::class, $response);
25
    }
26
}
27