Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Nov 27, 2024
1 parent 0ea4258 commit 4a38378
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Foundation/Console/DuskCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected function phpunitArguments($options)
'phpunit.xml',
'phpunit.xml.dist',
])->map(static fn ($file) => package_path($file))
->filter(static fn ($file) => file_exists($file))
->filter(static fn ($file) => is_file($file))
->first();

return ! \is_null($file) ? array_merge(['-c', $file], $options) : $options;
Expand All @@ -86,7 +86,7 @@ protected function writeConfiguration()
'phpunit.xml',
'phpunit.xml.dist',
])->map(static fn ($file) => package_path($file))
->filter(static fn ($file) => file_exists($file))
->filter(static fn ($file) => is_file($file))
->first();

if (\is_null($file)) {
Expand All @@ -105,7 +105,7 @@ protected function writeConfiguration()
*/
protected function removeConfiguration()
{
if (! $this->hasPhpUnitConfiguration && file_exists($file = package_path('phpunit.dusk.xml'))) {
if (! $this->hasPhpUnitConfiguration && is_file($file = package_path('phpunit.dusk.xml'))) {
@unlink($file);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Foundation/TestbenchServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function register()
*/
public function boot()
{
if (file_exists($this->app->basePath('migrations'))) {
if (is_dir($this->app->basePath('migrations'))) {
$this->loadMigrationsFrom($this->app->basePath('migrations'));
}

Expand Down

0 comments on commit 4a38378

Please sign in to comment.