summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Light <sam@lightscale.co.uk>2025-03-31 23:21:14 +0100
committerSam Light <samlight1994@gmail.com>2025-03-31 23:21:14 +0100
commita738dffb1bf146399916d26c151bca252d517c00 (patch)
tree89a2f0a2bdd2d1cebe250f40c53316e29276d0c7
parent35e124960f3103d0cebc5b843054930c730998ab (diff)
Created FileTest
-rw-r--r--tests/Unit/FileTest.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/Unit/FileTest.php b/tests/Unit/FileTest.php
new file mode 100644
index 0000000..d1c4bf4
--- /dev/null
+++ b/tests/Unit/FileTest.php
@@ -0,0 +1,19 @@
+<?php
+
+use Lightscale\LaralightAssets\ScriptFile;
+use Lightscale\LaralightAssets\StyleFile;
+
+test('script file html', function() {
+ $file = new ScriptFile('test.js');
+ expect($file->toHtml())->toBe('<script src="test.js"></script>');
+});
+
+test('style file html', function() {
+ $file = new StyleFile('test.css');
+ expect($file->toHtml())->toBe('<link type="text/css" rel="stylesheet" href="test.css" />');
+});
+
+test('script file hash', function() {
+ $file = new ScriptFile('test.js');
+ expect($file->hash())->toBeString();
+});