Skip to content

Commit

Permalink
Merge branch 'develop' 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 Aug 8, 2023
2 parents 938fb7e + 9c5a471 commit 1aa6dbe
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG-7.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This changelog references the relevant changes (bug and security fixes) done to `orchestra/testbench-dusk`.

## 7.27.0

Released: 2023-08-08

### Changes

* Update minimum support for Testbench v7.26.0+. ([v7.25.0...v7.26.0](https://github.com/orchestral/testbench/compare/v7.25.0...v7.26.0))
* Autoload `Laravel\Dusk\DuskServiceProvider` service provider.

## 7.26.1

Released: 2023-07-25
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG-8.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This changelog references the relevant changes (bug and security fixes) done to `orchestra/testbench-dusk`.

## 8.7.0

Released: 2023-08-08

### Changes

* Update minimum support for Testbench v8.6.0+. ([v8.5.7...v8.6.0](https://github.com/orchestral/testbench/compare/v8.5.7...v8.6.0))
* Autoload `Laravel\Dusk\DuskServiceProvider` service provider.

## 8.6.7

Released: 2023-07-25
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
"php": "^8.1",
"composer-runtime-api": "^2.2",
"konsulting/project-root": "^1.1",
"laravel/dusk": "^7.8",
"laravel/dusk": "^7.9",
"laravel/serializable-closure": "^1.0",
"orchestra/dusk-updater": "^2.2",
"orchestra/testbench": ">=8.5.7 <8.6.0 || 8.x-dev",
"orchestra/dusk-updater": "^2.2.1",
"orchestra/testbench": ">=8.6.0 <8.7.0 || 8.x-dev",
"php-webdriver/webdriver": "^1.9"
},
"require-dev": {
Expand Down
20 changes: 19 additions & 1 deletion src/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Illuminate\Foundation\Application;
use Illuminate\Support\Str;
use Laravel\Dusk\DuskServiceProvider;
use Orchestra\Testbench\Dusk\Foundation\PackageManifest;
use Orchestra\Testbench\Dusk\Options as DuskOptions;
use Orchestra\Testbench\TestCase as Testbench;
Expand Down Expand Up @@ -65,7 +66,7 @@ public static function getBaseServeHost()
*/
public static function applicationBasePath()
{
return $_ENV['APP_BASE_PATH'] ?? realpath(__DIR__.'/../laravel');
return static::applicationBasePathUsingWorkbench() ?? (string) realpath(__DIR__.'/../laravel');
}

/**
Expand Down Expand Up @@ -107,6 +108,19 @@ protected function setUpTheTestEnvironmentTraitToBeIgnored(string $use): bool
]) || parent::setUpTheTestEnvironmentTraitToBeIgnored($use);
}

/**
* Get application providers.
*
* @param \Illuminate\Foundation\Application $app
* @return array<int, class-string>
*/
protected function getApplicationProviders($app)
{
return array_merge(parent::getApplicationProviders($app), [
DuskServiceProvider::class,
]);
}

/**
* Setup parallel testing callback.
*/
Expand Down Expand Up @@ -231,6 +245,8 @@ public static function prepare()
*/
public static function setUpBeforeClass(): void
{
parent::setUpBeforeClass();

static::startServing();
}

Expand All @@ -242,6 +258,8 @@ public static function setUpBeforeClass(): void
public static function tearDownAfterClass(): void
{
static::stopServing();

parent::tearDownAfterClass();
}

/**
Expand Down
1 change: 1 addition & 0 deletions testbench-dusk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env php
<?php

define('TESTBENCH_CORE', true);
define('TESTBENCH_DUSK', true);
define('TESTBENCH_WORKING_PATH', $workingPath = getcwd());

Expand Down

0 comments on commit 1aa6dbe

Please sign in to comment.