diff --git a/tests/Integration/Generators/EnumMakeCommandTest.php b/tests/Integration/Generators/EnumMakeCommandTest.php index 43feaeba2da5..12df769bb895 100644 --- a/tests/Integration/Generators/EnumMakeCommandTest.php +++ b/tests/Integration/Generators/EnumMakeCommandTest.php @@ -2,6 +2,7 @@ namespace Integration\Generators; +use Illuminate\Support\Facades\File; use Illuminate\Tests\Integration\Generators\TestCase; class EnumMakeCommandTest extends TestCase @@ -38,4 +39,17 @@ public function testItCanGenerateEnumFileWithInt() 'enum IntEnum: int', ], 'app/IntEnum.php'); } + + public function testItCanGenerateEnumFileInEnumsFolder() + { + File::makeDirectory(app_path() . '\\Enums', force: true); + + $this->artisan('make:enum', ['name' => 'ImplicitEnum']) + ->assertExitCode(0); + + $this->assertFileContains([ + 'namespace App\Enums;', + 'enum ImplicitEnum', + ], 'app/Enums/ImplicitEnum.php'); + } }