File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
tests/Console/GeneratorCommand/GenerateIdeHelper Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 66
77use Barryvdh \LaravelIdeHelper \Console \GeneratorCommand ;
88use Barryvdh \LaravelIdeHelper \Tests \Console \GeneratorCommand \AbstractGeneratorCommand ;
9+ use Illuminate \Support \Arr ;
10+ use Illuminate \Support \Facades \DB ;
911
1012class Test extends AbstractGeneratorCommand
1113{
1214 public function testGenerator (): void
1315 {
16+ Arr::macro ('arr_custom_macro ' ,function (){});
17+ DB ::macro ('db_custom_macro ' ,function (){});
18+
1419 $ command = $ this ->app ->make (GeneratorCommand::class);
1520
1621 $ tester = $ this ->runCommand ($ command );
1722
1823 $ this ->assertSame (0 , $ tester ->getStatusCode ());
24+
1925 $ this ->assertStringContainsString ('A new helper file was written to _ide_helper.php ' , $ tester ->getDisplay ());
2026 $ this ->assertStringContainsString ('public static function configure($basePath = null) ' , $ this ->mockFilesystemOutput );
27+ $ this ->assertStringContainsString ('public static function arr_custom_macro() ' , $ this ->mockFilesystemOutput );
28+ $ this ->assertStringContainsString ('public static function db_custom_macro() ' , $ this ->mockFilesystemOutput );
2129 }
2230
2331 public function testFilename (): void
You can’t perform that action at this time.
0 commit comments