diff options
author | Sam Light <sam@lightscale.co.uk> | 2025-03-31 23:28:21 +0100 |
---|---|---|
committer | Sam Light <samlight1994@gmail.com> | 2025-03-31 23:28:21 +0100 |
commit | 138ff4bea020350f6b067624dea328d88ceb74b0 (patch) | |
tree | 73b550350f0aaaf2470ddc6d80c9bba9a0f60cb0 /tests/Feature | |
parent | 292c0eb477a8ffb7d3389a44ff1d41ccdc2ee790 (diff) |
Queuing files
Diffstat (limited to 'tests/Feature')
-rw-r--r-- | tests/Feature/AssetsTest.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/Feature/AssetsTest.php b/tests/Feature/AssetsTest.php index f618d46..9614eee 100644 --- a/tests/Feature/AssetsTest.php +++ b/tests/Feature/AssetsTest.php @@ -94,5 +94,24 @@ describe('manages manifests', function() use ($newManifest) { $result = $assets->getFileManifest($file); expect($result)->toBe($manifest); }); +}); + +describe('queuing files', function() use ($newManifest) { + test('queue script', function() use ($newManifest) { + $assets = app(Assets::class); + $manifest = $newManifest(); + $assets->addManifest('main', $manifest, true); + $assets->queueScript('main::main.js'); + + expect($assets->getQueuedFooterFiles())->toBeArray()->toHaveLength(1); + }); + + test('queue style', function() use ($newManifest) { + $assets = app(Assets::class); + $manifest = $newManifest(); + $assets->addManifest('main', $manifest, true); + $assets->queueStyle('main::main.css'); + expect($assets->getQueuedHeadFiles())->toBeArray()->toHaveLength(1); + }); }); |