CurrencyTest::test_to_array()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 12
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Chemaclass\StockTickerTests\Unit\Domain\WriteModel;
6
7
use Chemaclass\StockTicker\Domain\WriteModel\Currency;
8
use PHPUnit\Framework\TestCase;
9
10
final class CurrencyTest extends TestCase
11
{
12
    public function test_to_array(): void
13
    {
14
        $array = [
15
            'currency' => 'USD',
16
            'symbol' => '$',
17
        ];
18
19
        $model = (new Currency())->fromArray($array);
20
21
        self::assertEquals($array, $model->toArray());
22
        self::assertEquals($array['currency'], $model->getCurrency());
23
        self::assertEquals($array['symbol'], $model->getSymbol());
24
    }
25
}
26