Passed
Push — master ( 8bad73...c5d158 )
by David
57s queued 11s
created

AssetTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

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