TypeValueTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
c 1
b 0
f 0
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCreate() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MaxBeckers\AmazonAlexa\Test\Response\Directives\Dialog\Entity;
6
7
use MaxBeckers\AmazonAlexa\Response\Directives\Dialog\Entity\TypeValue;
8
use PHPUnit\Framework\TestCase;
9
10
class TypeValueTest extends TestCase
11
{
12
    public function testCreate(): void
13
    {
14
        $typeValue = TypeValue::create('BOS', 'Logan International Airport', ['Boston Logan']);
15
16
        $json = \file_get_contents(__DIR__ . '/../../../../Response/Data/directive_entity_type_value.json');
17
        $expected = \json_encode(\json_decode($json));
18
        $actual = \json_encode($typeValue);
19
20
        $this->assertSame($expected, $actual);
21
    }
22
}
23