Passed
Pull Request — master (#9)
by Quang
02:23
created

ClearProcessorCacheCommandTest::testHandle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 0
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Digia\Lumen\GraphQL\Tests\Commands;
4
5
use Digia\Lumen\GraphQL\Commands\ClearProcessorCacheCommand;
6
use Digia\Lumen\GraphQL\GraphQLService;
7
use Digia\Lumen\GraphQL\Tests\TestCase;
8
9
/**
10
 * Class ClearProcessorCacheCommandTest
11
 * @package ALehdet\ContentApi\Tests\Unit\GraphQL\Console\Commands
12
 */
13
class ClearProcessorCacheCommandTest extends TestCase
14
{
15
16
    /**
17
     * Tests that the command correctly calls the service
18
     */
19
    public function testHandle()
20
    {
21
        /** @var \PHPUnit_Framework_MockObject_MockObject|GraphQLService $service */
22
        $service = $this->getMockBuilder(GraphQLService::class)
23
                        ->disableOriginalConstructor()
24
                        ->setMethods(['forgetProcessor'])
25
                        ->getMock();
26
27
        $service->expects($this->once())
28
                ->method('forgetProcessor');
29
30
        $command = new ClearProcessorCacheCommand($service);
31
        $command->handle();
32
    }
33
34
}
35