@@ -16,9 +16,6 @@ protected function tearDown(): void
16
16
m::close ();
17
17
}
18
18
19
- /**
20
- * @dataProvider testData
21
- */
22
19
public function test_capture_failures_for ()
23
20
{
24
21
$ browser = m::mock (stdClass::class);
@@ -31,34 +28,51 @@ public function test_capture_failures_for()
31
28
}
32
29
33
30
/**
34
- * @dataProvider testData
31
+ * @dataProvider data
35
32
*/
36
- public function test_store_console_logs_for ()
33
+ public function test_capture_failures_for_data ()
34
+ {
35
+ $ browser = m::mock (stdClass::class);
36
+ $ browser ->shouldReceive ('screenshot ' )->with (
37
+ 'failure-Laravel_Dusk_Tests_Unit_ProvidesBrowserTest_test_capture_failures_for_data_foo-0 '
38
+ );
39
+ $ browsers = collect ([$ browser ]);
40
+
41
+ $ this ->captureFailuresFor ($ browsers );
42
+ }
43
+
44
+ /**
45
+ * @dataProvider data
46
+ */
47
+ public function test_store_console_logs_for_data ()
37
48
{
38
49
$ browser = m::mock (stdClass::class);
39
50
$ browser ->shouldReceive ('storeConsoleLog ' )->with (
40
- 'Laravel_Dusk_Tests_Unit_ProvidesBrowserTest_test_store_console_logs_for -0 '
51
+ 'Laravel_Dusk_Tests_Unit_ProvidesBrowserTest_test_store_console_logs_for_data_foo -0 '
41
52
);
42
53
$ browsers = collect ([$ browser ]);
43
54
44
55
$ this ->storeConsoleLogsFor ($ browsers );
45
56
}
46
57
47
- public function test_truncate_test_name_where_that_name_is_too_long_and_might_cause_issues ()
58
+ /**
59
+ * @dataProvider data
60
+ */
61
+ public function test_truncate_test_name_where_that_name_is_really_really_really_too_long_and_might_cause_issues_data ()
48
62
{
49
63
$ browser = m::mock (stdClass::class);
50
64
$ browser ->shouldReceive ('storeConsoleLog ' )->with (
51
- 'Laravel_Dusk_Tests_Unit_ProvidesBrowserTest_test_truncate_test_name_where_that_name_is_too_long_and_might_cause_is -0 '
65
+ 'Dusk_Tests_Unit_ProvidesBrowserTest_test_truncate_test_name_where_that_name_is_really_really_really_too_long_and_might_cause_issues_data_foo -0 '
52
66
);
53
67
$ browsers = collect ([$ browser ]);
54
68
55
69
$ this ->storeConsoleLogsFor ($ browsers );
56
70
}
57
71
58
- public static function testData ()
72
+ public static function data ()
59
73
{
60
74
return [
61
- ['foo ' ],
75
+ ' foo ' => ['foo ' ],
62
76
];
63
77
}
64
78
0 commit comments