File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 44
55use Illuminate \Support \Facades \Artisan ;
66use Illuminate \Support \Facades \File ;
7+ use Mockery ;
78
89trait ArtisanAsserts
910{
11+ protected function willSeeConfirmation ($ question , $ command , array $ parameters = [])
12+ {
13+ $ mock = Mockery::mock ("{$ command }[confirm] " );
14+ $ mock ->shouldReceive ('confirm ' )->once ()->with ($ question );
15+
16+ $ this ->runArtisan ($ mock , $ parameters );
17+ }
18+
19+ protected function willNotSeeConfirmation ($ question , $ command , array $ parameters = [])
20+ {
21+ $ mock = Mockery::mock ("{$ command }[confirm] " );
22+ $ mock ->shouldNotReceive ('confirm ' )->once ()->with ($ question );
23+
24+ $ this ->runArtisan ($ mock , $ parameters );
25+ }
26+
1027 protected function seeArtisanOutput ($ output )
1128 {
1229 if (File::exists ($ output )) {
You can’t perform that action at this time.
0 commit comments