@@ -8,7 +8,7 @@ class InitCommandTest extends TestCase
88{
99 use InitCommandMockTrait;
1010
11- public function testRunWithoutAdminAndReadmeCreation ()
11+ public function testRunWithoutAdminAndReadmeCreationConvertAppNameToPascalCaseTelescopeAlreadyInstalled ()
1212 {
1313 $ this ->mockFileGetContent (
1414 [
@@ -24,36 +24,32 @@ public function testRunWithoutAdminAndReadmeCreation()
2424 $ this ->mockFilePutContent (
2525 'env.example_app_name_pascal_case.yml ' ,
2626 'env.development_app_name_pascal_case.yml ' ,
27- [
28- 'renovate.json ' ,
29- $ this ->getFixture ('renovate.json ' ),
30- 'optionalParameter ' ,
31- 'optionalParameter ' ,
32- ],
3327 );
3428
29+ $ this ->mockClassExists ([
30+ 'arguments ' => ['Laravel\Telescope\TelescopeServiceProvider ' , true ],
31+ ]);
32+
3533 $ this ->mockShellExec (
3634 ['arguments ' => 'composer require ronasit/laravel-helpers --ansi ' ],
3735 ['arguments ' => 'composer require ronasit/laravel-swagger --ansi ' ],
3836 ['arguments ' => 'composer require --dev ronasit/laravel-entity-generator --ansi ' ],
39- ['arguments ' => 'composer require ronasit/laravel-telescope-extension --ansi ' ],
40- ['arguments ' => 'php artisan telescope:install --ansi ' ],
4137 );
4238
4339 $ this
44- ->artisan ('init "MyApp" ' )
40+ ->artisan ('init "My App" ' )
41+ ->expectsConfirmation ('The application name is not in PascalCase, would you like to use MyApp ' , 'yes ' )
4542 ->expectsOutput ('Project initialized successfully! ' )
4643 ->expectsQuestion ('Please enter an application URL ' , 'https://mysite.com ' )
4744 ->expectsConfirmation ('Do you want to generate an admin user? ' )
4845 ->expectsConfirmation ('Do you want to generate a README file? ' )
49- ->expectsConfirmation ('Would you use Renovate dependabot? ' , 'yes ' )
50- ->expectsQuestion ('Please type username of the project reviewer ' , 'reviewer ' )
46+ ->expectsConfirmation ('Would you use Renovate dependabot? ' )
5147 ->expectsConfirmation ('Do you want to install media package? ' )
5248 ->expectsConfirmation ('Do you want to uninstall project-initializator package? ' )
5349 ->assertExitCode (0 );
5450 }
5551
56- public function testRunWithoutAdminAndReadmeCreationConvertAppNameToPascalCase ()
52+ public function testRunWithoutAdminAndReadmeCreation ()
5753 {
5854 $ this ->mockFileGetContent (
5955 [
@@ -69,6 +65,12 @@ public function testRunWithoutAdminAndReadmeCreationConvertAppNameToPascalCase()
6965 $ this ->mockFilePutContent (
7066 'env.example_app_name_pascal_case.yml ' ,
7167 'env.development_app_name_pascal_case.yml ' ,
68+ [
69+ 'renovate.json ' ,
70+ $ this ->getFixture ('renovate.json ' ),
71+ 'optionalParameter ' ,
72+ 'optionalParameter ' ,
73+ ],
7274 );
7375
7476 $ this ->mockShellExec (
@@ -80,13 +82,13 @@ public function testRunWithoutAdminAndReadmeCreationConvertAppNameToPascalCase()
8082 );
8183
8284 $ this
83- ->artisan ('init "My App" ' )
84- ->expectsConfirmation ('The application name is not in PascalCase, would you like to use MyApp ' , 'yes ' )
85+ ->artisan ('init "MyApp" ' )
8586 ->expectsOutput ('Project initialized successfully! ' )
8687 ->expectsQuestion ('Please enter an application URL ' , 'https://mysite.com ' )
8788 ->expectsConfirmation ('Do you want to generate an admin user? ' )
8889 ->expectsConfirmation ('Do you want to generate a README file? ' )
89- ->expectsConfirmation ('Would you use Renovate dependabot? ' )
90+ ->expectsConfirmation ('Would you use Renovate dependabot? ' , 'yes ' )
91+ ->expectsQuestion ('Please type username of the project reviewer ' , 'reviewer ' )
9092 ->expectsConfirmation ('Do you want to install media package? ' )
9193 ->expectsConfirmation ('Do you want to uninstall project-initializator package? ' )
9294 ->assertExitCode (0 );
0 commit comments