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

AssetTest::testToSimpleArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 0
dl 0
loc 13
rs 10
c 0
b 0
f 0
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