Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and clean up test code and improve testing performance #669

Merged
merged 1 commit into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Facades/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public static function unlinkIfExists(string $path): bool
*/
public static function getContents(string $path, bool $lock = false): string
{
return self::get($path, $lock);
return self::get(...func_get_args());
}

/**
Expand All @@ -141,7 +141,7 @@ public static function getContents(string $path, bool $lock = false): string
*/
public static function putContents(string $path, string $contents, bool $lock = false): bool|int
{
return self::put($path, $contents, $lock);
return self::put(...func_get_args());
}

protected static function filesystem(): \Illuminate\Filesystem\Filesystem
Expand Down
5 changes: 2 additions & 3 deletions src/Framework/Actions/BladeMatterParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

namespace Hyde\Framework\Actions;

use Hyde\Hyde;
use RuntimeException;
use Hyde\Facades\Filesystem;

use function file_get_contents;
use function str_ends_with;
use function str_starts_with;
use function substr_count;
Expand Down Expand Up @@ -53,7 +52,7 @@ class BladeMatterParser

public static function parseFile(string $path): array
{
return static::parseString(file_get_contents(Hyde::path($path)));
return static::parseString(Filesystem::getContents($path));
}

public static function parseString(string $contents): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Hyde\Framework\Testing\Unit;
namespace Hyde\Framework\Testing\Feature;

use Hyde\Facades\Filesystem;
use Hyde\Foundation\Facades\Routes;
Expand Down
Loading
Loading