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

IdleCommandTest   A

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\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