diff --git a/tests/Integration/Generators/MailMakeCommandTest.php b/tests/Integration/Generators/MailMakeCommandTest.php index 06b418fec16..609e9b96738 100644 --- a/tests/Integration/Generators/MailMakeCommandTest.php +++ b/tests/Integration/Generators/MailMakeCommandTest.php @@ -71,4 +71,38 @@ public function testItCanGenerateMailFileWithTest() $this->assertFilenameNotExists('resources/views/foo-mail.blade.php'); $this->assertFilenameExists('tests/Feature/Mail/FooMailTest.php'); } + + public function testItCanGenerateMailWithNoInitialInput() + { + $this->artisan('make:mail') + ->expectsQuestion('What should the mailable be named?', 'FooMail') + ->expectsQuestion('Would you like to create a view?', 'none') + ->assertExitCode(0); + + $this->assertFilenameExists('app/Mail/FooMail.php'); + $this->assertFilenameDoesNotExists('resources/views/mail/foo-mail.blade.php'); + } + + public function testItCanGenerateMailWithViewWithNoInitialInput() + { + $this->artisan('make:mail') + ->expectsQuestion('What should the mailable be named?', 'MyFooMail') + ->expectsQuestion('Would you like to create a view?', 'view') + ->assertExitCode(0); + + $this->assertFilenameExists('app/Mail/MyFooMail.php'); + $this->assertFilenameExists('resources/views/mail/my-foo-mail.blade.php'); + } + + public function testItCanGenerateMailWithMarkdownViewWithNoInitialInput() + { + $this->artisan('make:mail') + + ->expectsQuestion('What should the mailable be named?', 'FooMail') + ->expectsQuestion('Would you like to create a view?', 'markdown') + ->assertExitCode(0); + + $this->assertFilenameExists('app/Mail/MyFooMail.php'); + $this->assertFilenameExists('resources/views/mail/my-foo-mail.blade.php'); + } } diff --git a/tests/Integration/Generators/ViewMakeCommandTest.php b/tests/Integration/Generators/ViewMakeCommandTest.php index d8779d735de..202bc15656a 100644 --- a/tests/Integration/Generators/ViewMakeCommandTest.php +++ b/tests/Integration/Generators/ViewMakeCommandTest.php @@ -26,38 +26,4 @@ public function testItCanGenerateViewFileWithTest() $this->assertFilenameExists('resources/views/foo.blade.php'); $this->assertFilenameExists('tests/Feature/View/FooTest.php'); } - - public function testItCanGenerateMailWithNoInitialInput() - { - $this->artisan('make:mail') - ->expectsQuestion('What should the mailable be named?', 'FooMail') - ->expectsQuestion('Would you like to create a view?', 'none') - ->assertExitCode(0); - - $this->assertFilenameExists('app/Mail/FooMail.php'); - $this->assertFilenameDoesNotExists('resources/views/mail/foo-mail.blade.php'); - } - - public function testItCanGenerateMailWithViewWithNoInitialInput() - { - $this->artisan('make:mail') - ->expectsQuestion('What should the mailable be named?', 'MyFooMail') - ->expectsQuestion('Would you like to create a view?', 'view') - ->assertExitCode(0); - - $this->assertFilenameExists('app/Mail/MyFooMail.php'); - $this->assertFilenameExists('resources/views/mail/my-foo-mail.blade.php'); - } - - public function testItCanGenerateMailWithMarkdownViewWithNoInitialInput() - { - $this->artisan('make:mail') - - ->expectsQuestion('What should the mailable be named?', 'FooMail') - ->expectsQuestion('Would you like to create a view?', 'markdown') - ->assertExitCode(0); - - $this->assertFilenameExists('app/Mail/MyFooMail.php'); - $this->assertFilenameExists('resources/views/mail/my-foo-mail.blade.php'); - } }