AssetToStringFunction   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testAssetToStringFunction() 0 8 1
1
<?php
2
3
namespace gulch\Assets\Tests;
4
5
use PHPUnit\Framework\TestCase;
6
use gulch\Assets\Asset;
7
use gulch\Assets\Renderer\AsyncJsRenderer;
8
9
class AssetToStringFunction extends TestCase
10
{
11
    /** @test */
12
    public function testAssetToStringFunction()
13
    {
14
        $asset = new Asset(new AsyncJsRenderer);
15
        $asset->add('asset.js');
16
17
        $this->assertSame(
18
            '<script async src="asset.js"></script>',
19
            (string)$asset
20
        );
21
    }
22
}
23