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 30, 2024
2 parents 0eb7df9 + f65bc08 commit d4b26fe
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Foundation/Console/DuskCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,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 @@ -81,7 +81,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 @@ -102,7 +102,7 @@ protected function writeConfiguration()
#[\Override]
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
12 changes: 12 additions & 0 deletions src/Foundation/Console/SyncSkeletonCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Orchestra\Testbench\Dusk\Foundation\Console;

use Orchestra\Testbench\Foundation\Console\SyncSkeletonCommand as Command;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'package:sync-skeleton', description: 'Sync skeleton folder to be served externally')]
class SyncSkeletonCommand extends Command
{
//
}
1 change: 1 addition & 0 deletions src/Foundation/TestbenchServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function boot(): void
Console\PurgeCommand::class,
Console\PurgeSkeletonCommand::class,
Console\ServeCommand::class,
Console\SyncSkeletonCommand::class,
]);
}
}
Expand Down
1 change: 1 addition & 0 deletions testbench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ migrations:
workbench:
health: true
welcome: false
auth: true
build:
- drop-sqlite-db
- create-sqlite-db
Expand Down

0 comments on commit d4b26fe

Please sign in to comment.