diff options
-rw-r--r-- | tests/Unit/FileTest.php | 19 |
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(); +}); |