diff --git a/app/config/container.php b/app/config/container.php index 4261b0b..e453907 100644 --- a/app/config/container.php +++ b/app/config/container.php @@ -16,7 +16,6 @@ return [ /** Path definitions and helpers */ 'base_path' => dirname(__DIR__, 2), 'app_path' => dirname(__DIR__), - 'asset_path' => string('{app_path}/assets'), 'cache_path' => string('{app_path}/cache'), 'config_path' => string('{app_path}/config'), 'source_path' => string('{app_path}/src'), @@ -49,7 +48,6 @@ return [ /** Array of view functions */ 'view_functions' => [ ViewFunctions\Analytics::class, - ViewFunctions\Asset::class, ViewFunctions\Breadcrumbs::class, ViewFunctions\Config::class, ViewFunctions\FileUrl::class, diff --git a/app/src/ViewFunctions/Asset.php b/app/src/ViewFunctions/Asset.php deleted file mode 100644 index 840e529..0000000 --- a/app/src/ViewFunctions/Asset.php +++ /dev/null @@ -1,24 +0,0 @@ -cache = new ArrayAdapter($this->config->get('cache_lifetime')); $this->container->set('base_path', $this->testFilesPath); - $this->container->set('asset_path', $this->filePath('app/assets')); $this->container->set('cache_path', $this->filePath('app/cache')); } diff --git a/tests/ViewFunctions/AssetTest.php b/tests/ViewFunctions/AssetTest.php deleted file mode 100644 index 71e1450..0000000 --- a/tests/ViewFunctions/AssetTest.php +++ /dev/null @@ -1,31 +0,0 @@ -container->set('base_path', $this->filePath('.')); - $asset = new Asset($this->config); - - $this->assertEquals('app/assets/app.css?id=417c7a9bc03852aafb27', $asset('app.css')); - $this->assertEquals('app/assets/app.js?id=6753a7269276c7b52692', $asset('app.js')); - $this->assertEquals('app/assets/images/icon.png', $asset('images/icon.png')); - } - - public function test_it_can_return_an_asset_path_without_a_mix_manifest_file(): void - { - $this->container->set('asset_path', $this->filePath('.')); - - $asset = new Asset($this->config); - - $this->assertEquals('app/assets/app.css', $asset('app.css')); - $this->assertEquals('app/assets/app.js', $asset('app.js')); - $this->assertEquals('app/assets/images/icon.png', $asset('images/icon.png')); - } -}