diff --git a/tests/Integration/Generators/ClassMakeCommandTest.php b/tests/Integration/Generators/ClassMakeCommandTest.php index d3f68f0f9445..ebfa0269b385 100644 --- a/tests/Integration/Generators/ClassMakeCommandTest.php +++ b/tests/Integration/Generators/ClassMakeCommandTest.php @@ -14,6 +14,20 @@ public function testItCanGenerateClassFile() $this->assertFileContains([ 'namespace App;', 'class Reverb', + 'public function __construct()', ], 'app/Reverb.php'); } + + public function testItCanGenerateInvokableClassFile() + { + $this->artisan('make:class', ['name' => 'Notification', '--invokable' => true]) + ->assertExitCode(0); + + $this->assertFileContains([ + 'namespace App;', + 'class Notification', + 'public function __construct()', + 'public function __invoke()', + ], 'app/Notification.php'); + } }