| Total Complexity | 2 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 13 | class AssetSourceTest extends AbstractTest |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @dataProvider data_check |
||
| 17 | * @param $source |
||
| 18 | * @param $type |
||
| 19 | * @param $output |
||
| 20 | */ |
||
| 21 | public function test_check($source, $type, $output) |
||
| 22 | { |
||
| 23 | $mock = \Mockery::mock(AssetSource::class)->shouldAllowMockingProtectedMethods()->makePartial(); |
||
| 24 | $mock->shouldReceive('transformSourceWithAsset')->andReturnUsing(function ($argument) { |
||
| 25 | return '/assets'.$argument; |
||
| 26 | }); |
||
| 27 | $source = $mock->buildSource($source, $type); |
||
| 28 | self::assertSame($output, $source); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return array[] |
||
| 33 | */ |
||
| 34 | public function data_check() |
||
| 40 | ]; |
||
| 41 | } |
||
| 42 | } |