File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,13 @@ class AssetService
2424 */
2525 public string $ version = 'v2.0 ' ;
2626
27+ public function __construct ()
28+ {
29+ if (config ('hyde.hydefront_version ' )) {
30+ $ this ->version = config ('hyde.hydefront_version ' );
31+ }
32+ }
33+
2734 public function version (): string
2835 {
2936 return $ this ->version ;
Original file line number Diff line number Diff line change @@ -32,6 +32,13 @@ public function test_version_method_returns_version_property_when_config_overrid
3232 $ this ->assertEquals ($ service ->version , $ service ->version ());
3333 }
3434
35+ public function test_version_can_be_set_in_config ()
36+ {
37+ config (['hyde.hydefront_version ' => '1.0.0 ' ]);
38+ $ service = new AssetService ();
39+ $ this ->assertEquals ('1.0.0 ' , $ service ->version ());
40+ }
41+
3542 public function test_cdn_path_constructor_returns_cdn_uri ()
3643 {
3744 $ service = new AssetService ();
You can’t perform that action at this time.
0 commit comments