Skip to content

Commit

Permalink
Merge branch '7.x' into 8.x
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 6, 2024
2 parents 132c03c + b95f841 commit 8fbe18e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"test": [
"@php testbench-dusk package:drop-sqlite-db",
"@php testbench-dusk package:create-sqlite-db",
"@php vendor/bin/phpunit -c ./ --color"
"@php vendor/bin/phpunit --no-coverage --no-configuration --dont-report-useless-tests --bootstrap vendor/autoload.php --color tests"
],
"ci": [
"@prepare",
Expand Down
5 changes: 0 additions & 5 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
</testsuites>
<php>
<env name="APP_ENV" value="testing"/>
<env name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
<env name="DB_CONNECTION" value="sqlite"/>
</php>
<source>
<include>
<directory suffix=".php">src/</directory>
Expand Down
2 changes: 1 addition & 1 deletion src/Foundation/Console/DuskCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Laravel\Dusk\Console\DuskCommand as Command;
use Symfony\Component\Console\Attribute\AsCommand;

use function Illuminate\Filesystem\join_paths;
use function Orchestra\Testbench\join_paths;
use function Orchestra\Testbench\package_path;
use function Orchestra\Testbench\phpunit_version_compare;

Expand Down
7 changes: 4 additions & 3 deletions src/Foundation/Console/PurgeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Finder\Finder;

use function Orchestra\Testbench\join_paths;
use function Orchestra\Testbench\package_path;

#[AsCommand(name: 'package:dusk-purge', description: 'Purge the package debugging files for Dusk')]
Expand Down Expand Up @@ -48,15 +49,15 @@ public function __construct()
public function handle()
{
$this->purgeDebuggingFiles(
'tests/Browser/screenshots', 'failure-*'
join_paths('tests', 'Browser', 'screenshots'), 'failure-*'
);

$this->purgeDebuggingFiles(
'tests/Browser/console', '*.log'
join_paths('tests', 'Browser', 'console'), '*.log'
);

$this->purgeDebuggingFiles(
'tests/Browser/source', '*.txt'
join_paths('tests', 'Browser', 'source'), '*.txt'
);

return self::SUCCESS;
Expand Down
3 changes: 3 additions & 0 deletions tests/Browser/AuthTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Laravel\Dusk\Browser;
use Orchestra\Testbench\Attributes\WithConfig;
use Orchestra\Testbench\Concerns\WithLaravelMigrations;
use Orchestra\Testbench\Dusk\TestCase;
use Orchestra\Testbench\Factories\UserFactory;

#[WithConfig('app.key', 'AckfSECXIvnK5r28GVIWUAxmbBSjTsmF')]
#[WithConfig('database.default', 'sqlite')]
class AuthTest extends TestCase
{
use DatabaseMigrations;
Expand Down
2 changes: 2 additions & 0 deletions tests/Browser/DatabaseMigrationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Support\Facades\Schema;
use Orchestra\Testbench\Attributes\WithConfig;
use Orchestra\Testbench\Attributes\WithMigration;
use Orchestra\Testbench\Concerns\WithWorkbench;
use Orchestra\Testbench\Dusk\TestCase;

#[WithConfig('database.default', 'sqlite')]
class DatabaseMigrationsTest extends TestCase
{
use DatabaseMigrations, WithWorkbench;
Expand Down
2 changes: 2 additions & 0 deletions tests/Browser/WorkbenchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
namespace Orchestra\Testbench\Dusk\Tests\Browser;

use Illuminate\Contracts\Http\Kernel as HttpKernel;
use Orchestra\Testbench\Attributes\WithConfig;
use Orchestra\Testbench\Concerns\WithWorkbench;
use Orchestra\Testbench\Dusk\TestCase;
use Orchestra\Workbench\Http\Middleware\CatchDefaultRoute;

#[WithConfig('app.key', 'AckfSECXIvnK5r28GVIWUAxmbBSjTsmF')]
class WorkbenchTest extends TestCase
{
use WithWorkbench;
Expand Down

0 comments on commit 8fbe18e

Please sign in to comment.