blob: d2ba1260358499fc83ee3f5be538d648762bd3c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<?php
use Lightscale\LaralightAssets\Facades\Assets;
beforeEach(function() {
Assets::registerManifest(
'main', public_path('dist/manifest.json'), '/dist'
);
Assets::queueScript('main::main.js');
Assets::queueStyle('main::main.css');
});
it('render head', function() {
$view = $this->blade(
'<x-laralight-assets::head />'
);
$view->assertSee(sprintf(
'<link type="text/css" rel="stylesheet" href="%s" />',
asset('dist/main.testing.css')
), false);
});
it('render footer', function() {
$view = $this->blade(
'<x-laralight-assets::footer />'
);
$view->assertSee(sprintf(
'<script src="%s"></script>',
asset('dist/main.testing.js')
), false);
});
|