|
13 | 13 |
|
14 | 14 | test('that the command can get a single validated argument', function () : void
|
15 | 15 | {
|
16 |
| - Artisan::registerCommand(new FakeCommandToGetASingleValidatedArgument()); |
| 16 | + Artisan::registerCommand(new FakeCommandToGetASingleValidatedArgument); |
17 | 17 |
|
18 | 18 | artisan(FakeCommandToGetASingleValidatedArgument::class, ['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz'])
|
19 | 19 | ->expectsOutput("Foo: 'foo'")
|
|
23 | 23 |
|
24 | 24 | test('that the command can get a validated nullable argument', function () : void
|
25 | 25 | {
|
26 |
| - Artisan::registerCommand(new FakeCommandToGetASingleValidatedArgument()); |
| 26 | + Artisan::registerCommand(new FakeCommandToGetASingleValidatedArgument); |
27 | 27 |
|
28 | 28 | artisan(FakeCommandToGetASingleValidatedArgument::class, ['foo' => 'foo', 'bar' => null, 'baz' => 'baz'])
|
29 | 29 | ->expectsOutput("Foo: 'foo'")
|
|
36 | 36 | $this->expectException(UnvalidatedArgumentException::class);
|
37 | 37 | $this->expectExceptionMessage('The requested argument [foo] is not validated.');
|
38 | 38 |
|
39 |
| - Artisan::registerCommand(new FakeCommandToGetAnUnvalidatedArgument()); |
| 39 | + Artisan::registerCommand(new FakeCommandToGetAnUnvalidatedArgument); |
40 | 40 |
|
41 | 41 | artisan(FakeCommandToGetAnUnvalidatedArgument::class, ['foo' => 'foo'])
|
42 | 42 | ->assertSuccessful();
|
43 | 43 | });
|
44 | 44 |
|
45 | 45 | test('that the command can get all validated argument', function () : void
|
46 | 46 | {
|
47 |
| - Artisan::registerCommand(new FakeCommandToGetAllValidatedArguments()); |
| 47 | + Artisan::registerCommand(new FakeCommandToGetAllValidatedArguments); |
48 | 48 |
|
49 | 49 | artisan(FakeCommandToGetAllValidatedArguments::class, ['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz'])
|
50 | 50 | ->expectsOutput('{"foo":"foo","bar":"bar"}')
|
|
53 | 53 |
|
54 | 54 | test('that the command can collect all validated argument', function () : void
|
55 | 55 | {
|
56 |
| - Artisan::registerCommand(new FakeCommandToCollectAllValidatedArguments()); |
| 56 | + Artisan::registerCommand(new FakeCommandToCollectAllValidatedArguments); |
57 | 57 |
|
58 | 58 | artisan(FakeCommandToCollectAllValidatedArguments::class, ['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz'])
|
59 | 59 | ->expectsOutput("Type: 'Illuminate\Support\Collection'")
|
|
0 commit comments