File tree 3 files changed +23
-30
lines changed
3 files changed +23
-30
lines changed Original file line number Diff line number Diff line change 5
5
use Illuminate \Console \Scheduling \Schedule ;
6
6
use LaravelZero \Framework \Commands \Command ;
7
7
8
- class HelloCommand extends Command
8
+ class InspiringCommand extends Command
9
9
{
10
10
/**
11
- * The name and signature of the command.
11
+ * The signature of the command.
12
12
*
13
13
* @var string
14
14
*/
15
- protected $ signature = 'hello {name=Artisan} ' ;
15
+ protected $ signature = 'inspiring {name=Artisan} ' ;
16
16
17
17
/**
18
18
* The description of the command.
19
19
*
20
20
* @var string
21
21
*/
22
- protected $ description = 'Displays an "Hello" message ' ;
22
+ protected $ description = 'Display an inspiring quote ' ;
23
23
24
24
/**
25
- * Execute the command. Here goes the code.
26
- *
27
- * @return void
25
+ * Execute the console command.
28
26
*/
29
27
public function handle (): void
30
28
{
31
- $ this ->info ('Love beautiful code? We do too. ' );
32
-
33
- $ this ->notify ('Hello ' .$ this ->argument ('name ' ), 'Enjoy the fresh air! ' );
29
+ $ this ->info ('Simplicity is the ultimate sophistication. - Leonardo da Vinci ' );
34
30
35
- $ this ->comment ( ' Wanna see more? Type `php your-app- name list` ' );
31
+ $ this ->notify ( ' Hey ' . $ this -> argument ( ' name ' ), ' Enjoy the fresh air! ' );
36
32
}
37
33
38
34
/**
39
35
* Define the command's schedule.
40
36
*
41
37
* @param \Illuminate\Console\Scheduling\Schedule $schedule
42
- *
43
- * @return void
44
38
*/
45
39
public function schedule (Schedule $ schedule ): void
46
40
{
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Tests \Integration ;
4
+
5
+ use Tests \TestCase ;
6
+
7
+ class InspiringCommandTest extends TestCase
8
+ {
9
+ /** @test */
10
+ public function it_checks_the_inspire_sentence (): void
11
+ {
12
+ $ this ->app ->call ('inspiring ' );
13
+
14
+ $ this ->assertContains ('Simplicity is the ultimate sophistication. - Leonardo da Vinci ' , $ this ->app ->output ());
15
+ }
16
+ }
You can’t perform that action at this time.
0 commit comments