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 Jan 5, 2024
1 parent 93cf64a commit 1dd0e1b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/Concerns/ProvidesBrowser.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Exception;
use Illuminate\Support\Collection;
use Laravel\Dusk\Browser;
use PHPUnit\Framework\Attributes\AfterClass;
use PHPUnit\Runner\Version;
use ReflectionFunction;
use Throwable;
Expand All @@ -29,10 +30,9 @@ trait ProvidesBrowser
/**
* Tear down the Dusk test case class.
*
* @afterClass
*
* @return void
*/
#[AfterClass]
public static function tearDownDuskClass()
{
static::closeAll();
Expand Down
5 changes: 2 additions & 3 deletions tests/Unit/OperatingSystemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Laravel\Dusk\Tests\Unit;

use Laravel\Dusk\OperatingSystem;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

class OperatingSystemTest extends TestCase
Expand Down Expand Up @@ -41,9 +42,7 @@ public function test_it_cant_resolve_invalid_chrome_version_commands()
OperatingSystem::chromeVersionCommands('window_os');
}

/**
* @dataProvider resolveChromeDriverSlugDataProvider
*/
#[DataProvider('resolveChromeDriverSlugDataProvider')]
public function test_it_can_resolve_chromedriver_slug($version, $os, $expected)
{
$this->assertSame($expected, OperatingSystem::chromeDriverSlug($os, $version));
Expand Down
9 changes: 3 additions & 6 deletions tests/Unit/ProvidesBrowserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Laravel\Dusk\Concerns\ProvidesBrowser;
use Mockery as m;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use stdClass;

Expand All @@ -16,9 +17,7 @@ protected function tearDown(): void
m::close();
}

/**
* @dataProvider testData
*/
#[DataProvider('testData')]
public function test_capture_failures_for()
{
$browser = m::mock(stdClass::class);
Expand All @@ -30,9 +29,7 @@ public function test_capture_failures_for()
$this->captureFailuresFor($browsers);
}

/**
* @dataProvider testData
*/
#[DataProvider('testData')]
public function test_store_console_logs_for()
{
$browser = m::mock(stdClass::class);
Expand Down

0 comments on commit 1dd0e1b

Please sign in to comment.