File tree Expand file tree Collapse file tree 7 files changed +8
-31
lines changed Expand file tree Collapse file tree 7 files changed +8
-31
lines changed Original file line number Diff line number Diff line change 12
12
use Illuminate \Support \Str ;
13
13
use Orchestra \Testbench \Foundation \Application as Testbench ;
14
14
use Orchestra \Testbench \TestCase ;
15
+ use PHPUnit \Framework \Attributes \DataProvider ;
15
16
16
17
class CommandEventsTest extends TestCase
17
18
{
@@ -48,9 +49,7 @@ protected function setUp(): void
48
49
parent ::setUp ();
49
50
}
50
51
51
- /**
52
- * @dataProvider foregroundCommandEventsProvider
53
- */
52
+ #[DataProvider('foregroundCommandEventsProvider ' )]
54
53
public function testCommandEventsReceiveParsedInput ($ callback )
55
54
{
56
55
$ this ->app [ConsoleKernel::class]->registerCommand (new CommandEventsTestCommand );
Original file line number Diff line number Diff line change 6
6
use Illuminate \Filesystem \Filesystem ;
7
7
use Illuminate \Support \Str ;
8
8
use Orchestra \Testbench \TestCase ;
9
+ use PHPUnit \Framework \Attributes \DataProvider ;
9
10
10
11
class CommandSchedulingTest extends TestCase
11
12
{
@@ -62,9 +63,7 @@ protected function tearDown(): void
62
63
parent ::tearDown ();
63
64
}
64
65
65
- /**
66
- * @dataProvider executionProvider
67
- */
66
+ #[DataProvider('executionProvider ' )]
68
67
public function testExecutionOrder ($ background , $ expected )
69
68
{
70
69
$ schedule = $ this ->app ->make (Schedule::class);
Original file line number Diff line number Diff line change 3
3
namespace Illuminate \Tests \Integration \Console ;
4
4
5
5
use Orchestra \Testbench \TestCase ;
6
+ use PHPUnit \Framework \Attributes \DataProvider ;
6
7
7
8
class GeneratorCommandTest extends TestCase
8
9
{
9
- /**
10
- * @dataProvider reservedNamesDataProvider
11
- */
10
+ #[DataProvider('reservedNamesDataProvider ' )]
12
11
public function testItCannotGenerateClassUsingReservedName ($ given )
13
12
{
14
13
$ this ->artisan ('make:command ' , ['name ' => $ given ])
Original file line number Diff line number Diff line change 10
10
11
11
class CallbackEventTest extends TestCase
12
12
{
13
- protected function tearDown (): void
14
- {
15
- parent ::tearDown ();
16
-
17
- m::close ();
18
- }
19
-
20
13
public function testDefaultResultIsSuccess ()
21
14
{
22
15
$ success = null ;
Original file line number Diff line number Diff line change 16
16
17
17
class EventPingTest extends TestCase
18
18
{
19
- protected function tearDown (): void
20
- {
21
- parent ::tearDown ();
22
-
23
- m::close ();
24
- }
25
-
26
19
public function testPingRescuesTransferExceptions ()
27
20
{
28
21
$ this ->spy (ExceptionHandler::class)
Original file line number Diff line number Diff line change 7
7
use Illuminate \Support \Facades \Config ;
8
8
use Illuminate \Support \Sleep ;
9
9
use Orchestra \Testbench \TestCase ;
10
+ use PHPUnit \Framework \Attributes \DataProvider ;
10
11
11
12
class SubMinuteSchedulingTest extends TestCase
12
13
{
@@ -45,7 +46,7 @@ public function test_it_doesnt_wait_for_sub_minute_events_when_none_are_schedule
45
46
Sleep::assertNeverSlept ();
46
47
}
47
48
48
- /** @dataProvider frequencyProvider */
49
+ #[DataProvider( ' frequencyProvider ' )]
49
50
public function test_it_runs_sub_minute_callbacks ($ frequency , $ expectedRuns )
50
51
{
51
52
$ runs = 0 ;
Original file line number Diff line number Diff line change 14
14
15
15
class CookieTest extends TestCase
16
16
{
17
- protected function tearDown (): void
18
- {
19
- parent ::tearDown ();
20
-
21
- Carbon::setTestNow (null );
22
- }
23
-
24
17
public function test_cookie_is_sent_back_with_proper_expire_time_when_should_expire_on_close ()
25
18
{
26
19
$ this ->app ['config ' ]->set ('session.expire_on_close ' , true );
You can’t perform that action at this time.
0 commit comments