ClearFocusCommandTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 8
dl 0
loc 21
rs 10
c 1
b 0
f 1
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testConstructor() 0 5 1
A testJsonSerialize() 0 7 1
A testTypeConstant() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MaxBeckers\AmazonAlexa\Test\Response\Directives\APL\StandardCommand;
6
7
use MaxBeckers\AmazonAlexa\Response\Directives\APL\StandardCommand\ClearFocusCommand;
8
use PHPUnit\Framework\TestCase;
9
10
class ClearFocusCommandTest extends TestCase
11
{
12
    public function testConstructor(): void
13
    {
14
        $command = new ClearFocusCommand();
15
16
        $this->assertInstanceOf(ClearFocusCommand::class, $command);
17
    }
18
19
    public function testJsonSerialize(): void
20
    {
21
        $command = new ClearFocusCommand();
22
        $result = $command->jsonSerialize();
23
24
        $this->assertSame(ClearFocusCommand::TYPE, $result['type']);
25
        $this->assertCount(1, $result);
26
    }
27
28
    public function testTypeConstant(): void
29
    {
30
        $this->assertSame('ClearFocus', ClearFocusCommand::TYPE);
31
    }
32
}
33