Skip to content

Commit

Permalink
Merge branch '7.x' into 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
crynobone committed Nov 30, 2024
2 parents e05fcab + 49affad commit f65bc08
Show file tree
Hide file tree
Showing 4 changed files with 18 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 @@ -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
{
//
}
3 changes: 2 additions & 1 deletion src/Foundation/TestbenchServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,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 All @@ -44,6 +44,7 @@ public function boot()
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 @@ -6,6 +6,7 @@ migrations:

workbench:
welcome: false
auth: true
build:
- drop-sqlite-db
- create-sqlite-db
Expand Down

0 comments on commit f65bc08

Please sign in to comment.