Passed
Push — master ( a53d55...43aca1 )
by Maximilian
03:50
created

IdleCommandTest::testConstructor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 5
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\IdleCommand;
8
use PHPUnit\Framework\TestCase;
9
10
class IdleCommandTest extends TestCase
11
{
12
    public function testConstructor(): void
13
    {
14
        $command = new IdleCommand();
15
16
        $this->assertInstanceOf(IdleCommand::class, $command);
17
    }
18
19
    public function testJsonSerialize(): void
20
    {
21
        $command = new IdleCommand();
22
        $result = $command->jsonSerialize();
23
24
        $this->assertSame(IdleCommand::TYPE, $result['type']);
25
        $this->assertCount(1, $result);
26
    }
27
28
    public function testTypeConstant(): void
29
    {
30
        $this->assertSame('Idle', IdleCommand::TYPE);
31
    }
32
}
33