File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed 
src/Illuminate/Foundation/Console 
tests/Integration/Foundation/Console Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,13 @@ class ClosureCommand extends Command
2525     */ 
2626    protected  $ callback
2727
28+     /** 
29+      * The console command description. 
30+      * 
31+      * @var string 
32+      */ 
33+     protected  $ description'' ;
34+ 
2835    /** 
2936     * Create a new command instance. 
3037     * 
Original file line number Diff line number Diff line change 1+ <?php 
2+ 
3+ namespace  Illuminate \Tests \Integration \Foundation \Console ;
4+ 
5+ use  Illuminate \Support \Facades \Artisan ;
6+ use  Orchestra \Testbench \TestCase ;
7+ 
8+ class  ClosureCommandTest extends  TestCase
9+ {
10+     /** {@inheritDoc} */ 
11+     #[\Override]
12+     protected  function  defineEnvironment ($ app
13+     {
14+         Artisan::command ('inspire ' , function  () {
15+             $ this comment ('We must ship. - Taylor Otwell ' );
16+         })->purpose ('Display an inspiring quote ' );
17+     }
18+ 
19+     public  function  testItCanRunClosureCommand ()
20+     {
21+         $ this artisan ('inspire ' )->expectsOutput ('We must ship. - Taylor Otwell ' );
22+     }
23+ }
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments