Skip to content

Commit 077d448

Browse files
authored
[8.x] Supports PHPUnit 12.2 (#1174)
* [8.x] Supports PHPUnit 12.2 Signed-off-by: Mior Muhammad Zaki <[email protected]> * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> --------- Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent 1d71af4 commit 077d448

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tests/Unit/ProvidesBrowserTest.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,35 +29,38 @@ public function test_capture_failures_for()
2929
}
3030

3131
#[DataProvider('data')]
32-
public function test_capture_failures_for_data()
32+
public function test_capture_failures_for_data($data)
3333
{
3434
$browser = m::mock(stdClass::class);
3535
$browser->shouldReceive('screenshot')->with(
36-
'failure-Laravel_Dusk_Tests_Unit_ProvidesBrowserTest_test_capture_failures_for_data_foo-0'
36+
sprintf('failure-Laravel_Dusk_Tests_Unit_ProvidesBrowserTest_test_capture_failures_for_data_%s-0', $data)
3737
);
3838
$browsers = collect([$browser]);
3939

4040
$this->captureFailuresFor($browsers);
4141
}
4242

4343
#[DataProvider('data')]
44-
public function test_store_console_logs_for_data()
44+
public function test_store_console_logs_for_data($data)
4545
{
4646
$browser = m::mock(stdClass::class);
4747
$browser->shouldReceive('storeConsoleLog')->with(
48-
'Laravel_Dusk_Tests_Unit_ProvidesBrowserTest_test_store_console_logs_for_data_foo-0'
48+
sprintf('Laravel_Dusk_Tests_Unit_ProvidesBrowserTest_test_store_console_logs_for_data_%s-0', $data)
4949
);
5050
$browsers = collect([$browser]);
5151

5252
$this->storeConsoleLogsFor($browsers);
5353
}
5454

5555
#[DataProvider('data')]
56-
public function test_truncate_test_name_where_that_name_is_really_really_really_too_long_and_might_cause_issues_data()
56+
public function test_truncate_test_name_where_that_name_is_really_really_really_too_long_and_might_cause_issues_data($data)
5757
{
5858
$browser = m::mock(stdClass::class);
5959
$browser->shouldReceive('storeConsoleLog')->with(
60-
'Dusk_Tests_Unit_ProvidesBrowserTest_test_truncate_test_name_where_that_name_is_really_really_really_too_long_and_might_cause_issues_data_foo-0'
60+
sprintf(
61+
'Dusk_Tests_Unit_ProvidesBrowserTest_test_truncate_test_name_where_that_name_is_really_really_really_too_long_and_might_cause_issues_data_%s-0',
62+
$data
63+
)
6164
);
6265
$browsers = collect([$browser]);
6366

0 commit comments

Comments
 (0)