ClearFocusCommandTest::testTypeConstant()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 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