Skip to content

Commit

Permalink
Correcting the get() method of AssetManager and testPublishedAssets()…
Browse files Browse the repository at this point in the history
… of helper unit test
  • Loading branch information
Arman committed Aug 21, 2023
1 parent 6de8512 commit 5aa4ee1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Libraries/Asset/AssetManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function dump(int $type)
public function get(string $name): ?Asset
{
foreach ($this->store as $asset) {
if ($asset->getName()) {
if ($asset->getName() == $name) {
return $asset;
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Helpers/HelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ public function testPublishedAssets()

$expectedOutput = '<link rel="stylesheet" type="text/css" href="' . asset()->url('css/style.css') . '">' . PHP_EOL .
'<link rel="stylesheet" type="text/css" href="' . asset()->url('css/responsive.css') . '">' . PHP_EOL .
'<script src="' . asset()->url('js/bootstrap.js') . '"></script>' . PHP_EOL .
'<script src="' . asset()->url('js/bootstrap-datepicker.min.js') . '"></script>' . PHP_EOL;
'<script src="' . asset()->url('js/bootstrap.js') . '" ></script>' . PHP_EOL .
'<script src="' . asset()->url('js/bootstrap-datepicker.min.js') . '" ></script>' . PHP_EOL;

ob_start();

Expand Down

0 comments on commit 5aa4ee1

Please sign in to comment.