diff --git a/src/Commands/InitCommand.php b/src/Commands/InitCommand.php index 3a4c224..3bb02f1 100644 --- a/src/Commands/InitCommand.php +++ b/src/Commands/InitCommand.php @@ -252,14 +252,14 @@ public function handle(): void $this->setupComposerHooks(); - $this->changeMiddlewareForTelescopeAuthorization(); - $this->setAutoDocContactEmail($this->codeOwnerEmail); foreach ($this->shellCommands as $shellCommand) { shell_exec("{$shellCommand} --ansi"); } + $this->changeMiddlewareForTelescopeAuthorization(); + $this->publishWebLogin(); if ($this->shouldUninstallPackage) { diff --git a/tests/InitCommandTest.php b/tests/InitCommandTest.php index a3ed73d..f3e3402 100644 --- a/tests/InitCommandTest.php +++ b/tests/InitCommandTest.php @@ -14,8 +14,8 @@ public function testRunWithoutAdminAndReadmeCreationConvertAppNameToPascalCaseTe '\Winter\LaravelConfigWriter', $this->changeEnvFileCall('.env.example', 'env.example.yml', 'env.example_app_name_pascal_case.yml'), $this->changeEnvFileCall('.env.development', 'env.development.yml', 'env.development_app_name_pascal_case.yml'), - $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), $this->changeConfigFileCall('config/auto-doc.php', 'auto_doc.php', 'auto_doc_after_changes.php'), + $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), ); $this->mockNativeFunction( @@ -68,8 +68,8 @@ public function testRunWithoutAdminAndReadmeCreation() '\Winter\LaravelConfigWriter', $this->changeEnvFileCall('.env', 'env.example.yml', 'env.example_app_name_pascal_case.yml'), $this->changeEnvFileCall('.env.development', 'env.development.yml', 'env.development_app_name_pascal_case.yml'), - $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), $this->changeConfigFileCall('config/auto-doc.php', 'auto_doc.php', 'auto_doc_after_changes.php'), + $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), ); $this->mockNativeFunction( @@ -121,8 +121,8 @@ public function testRunWithAdminAndWithoutReadmeCreation() '\Winter\LaravelConfigWriter', $this->changeEnvFileCall('.env.example', 'env.example.yml', 'env.example_app_name_not_pascal_case.yml'), $this->changeEnvFileCall('.env.development', 'env.development.yml', 'env.development_app_name_not_pascal_case.yml'), - $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), $this->changeConfigFileCall('config/auto-doc.php', 'auto_doc.php', 'auto_doc_after_changes.php'), + $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), ); $this->mockNativeFunction( @@ -180,8 +180,8 @@ public function testRunWithAdminAndDefaultReadmeCreation() $this->changeEnvFileCall('.env.development', 'env.development.yml', 'env.development_app_name_not_pascal_case.yml'), $this->changeEnvFileCall('.env.development', 'env.development_app_name_not_pascal_case.yml', 'env.development_clerk_credentials_added.yml'), $this->changeEnvFileCall('.env.example', 'env.example_app_name_not_pascal_case.yml', 'env.example_clerk_credentials_added.yml'), - $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), $this->changeConfigFileCall('config/auto-doc.php', 'auto_doc.php', 'auto_doc_after_changes.php'), + $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), ); $this->mockNativeFunction( @@ -313,8 +313,8 @@ public function testRunWithAdminAndPartialReadmeCreation() '\Winter\LaravelConfigWriter', $this->changeEnvFileCall('.env.example', 'env.example.yml', 'env.example_app_name_not_pascal_case.yml'), $this->changeEnvFileCall('.env.development', 'env.development.yml', 'env.development_app_name_not_pascal_case.yml'), - $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), $this->changeConfigFileCall('config/auto-doc.php', 'auto_doc.php', 'auto_doc_after_changes.php'), + $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), ); $this->mockNativeFunction( @@ -420,8 +420,8 @@ public function testRunWithAdminAndFullReadmeCreationAndRemovingInitializatorIns '\Winter\LaravelConfigWriter', $this->changeEnvFileCall('.env.example', 'env.example.yml', 'env.example_app_name_not_pascal_case.yml'), $this->changeEnvFileCall('.env.development', 'env.development.yml', 'env.development_app_name_not_pascal_case.yml'), - $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), $this->changeConfigFileCall('config/auto-doc.php', 'auto_doc.php', 'auto_doc_after_changes.php'), + $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), ); $this->mockNativeFunction( @@ -545,8 +545,8 @@ public function testRunWithoutAdminAndUsingTelescope() '\Winter\LaravelConfigWriter', $this->changeEnvFileCall('.env.example', 'env.example.yml', 'env.example_app_name_not_pascal_case.yml'), $this->changeEnvFileCall('.env.development', 'env.development.yml', 'env.development_app_name_not_pascal_case.yml'), - $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), $this->changeConfigFileCall('config/auto-doc.php', 'auto_doc.php', 'auto_doc_after_changes.php'), + $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), ); $this->mockNativeFunction( @@ -664,8 +664,8 @@ public function testRunWithClerkMobileAppWithPintInstalled(): void $this->changeEnvFileCall('.env.development', 'env.development.yml', 'env.development_app_name_not_pascal_case.yml'), $this->changeEnvFileCall('.env.development', 'env.development_app_name_not_pascal_case.yml', 'env.development_clerk_credentials_added_mobile_app.yml'), $this->changeEnvFileCall('.env.example', 'env.example_app_name_not_pascal_case.yml', 'env.example_clerk_credentials_added_mobile_app.yml'), - $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), $this->changeConfigFileCall('config/auto-doc.php', 'auto_doc.php', 'auto_doc_after_changes.php'), + $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), ); $this->mockNativeFunction( @@ -795,8 +795,8 @@ public function testRunWithClerkAdditionalAdminsWithoutDefaultAdmin(): void $this->changeEnvFileCall('.env.development', 'env.development.yml', 'env.development_app_name_not_pascal_case.yml'), $this->changeEnvFileCall('.env.development', 'env.development_app_name_not_pascal_case.yml', 'env.development_clerk_credentials_added.yml'), $this->changeEnvFileCall('.env.example', 'env.example.yml', 'env.example_clerk_credentials_added.yml'), - $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), $this->changeConfigFileCall('config/auto-doc.php', 'auto_doc.php', 'auto_doc_after_changes.php'), + $this->changeConfigFileCall('config/telescope.php', 'telescope_config.php', 'telescope_config_after_initialization.php'), ); $this->mockNativeFunction(