Test Failed
Pull Request — master (#11)
by recca
07:11
created

AssetTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testToSimpleArray() 0 13 1
1
<?php
2
3
namespace TheCodingMachine\Discovery\Tests;
4
5
6
use PHPUnit\Framework\TestCase;
7
use TheCodingMachine\Discovery\Asset;
8
9
class AssetTest extends TestCase
10
{
11
    public function testToSimpleArray()
12
    {
13
        $asset = new Asset('foo', 'package/a', 'vendor/package/a', 0.0, null);
14
15
        $this->assertSame('foo', $asset->toSimpleArray());
16
17
        $asset = new Asset('foo', 'package/a', 'vendor/package/a', 1.0, ['bar' => 'baz']);
18
19
        $this->assertSame([
20
            'value' => 'foo',
21
            'priority' => 1.0,
22
            'metadata' => ['bar' => 'baz']
23
        ], $asset->toSimpleArray());
24
    }
25
}
26