@@ -8,7 +8,7 @@ class InitCommandTest extends TestCase
8
8
{
9
9
use InitCommandMockTrait;
10
10
11
- public function testRunWithoutAdminAndReadmeCreation ()
11
+ public function testRunWithoutAdminAndReadmeCreationConvertAppNameToPascalCaseTelescopeAlreadyInstalled ()
12
12
{
13
13
$ this ->mockFileGetContent (
14
14
[
@@ -24,36 +24,32 @@ public function testRunWithoutAdminAndReadmeCreation()
24
24
$ this ->mockFilePutContent (
25
25
'env.example_app_name_pascal_case.yml ' ,
26
26
'env.development_app_name_pascal_case.yml ' ,
27
- [
28
- 'renovate.json ' ,
29
- $ this ->getFixture ('renovate.json ' ),
30
- 'optionalParameter ' ,
31
- 'optionalParameter ' ,
32
- ],
33
27
);
34
28
29
+ $ this ->mockClassExists ([
30
+ 'arguments ' => ['Laravel\Telescope\TelescopeServiceProvider ' , true ],
31
+ ]);
32
+
35
33
$ this ->mockShellExec (
36
34
['arguments ' => 'composer require ronasit/laravel-helpers --ansi ' ],
37
35
['arguments ' => 'composer require ronasit/laravel-swagger --ansi ' ],
38
36
['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 ' ],
41
37
);
42
38
43
39
$ 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 ' )
45
42
->expectsOutput ('Project initialized successfully! ' )
46
43
->expectsQuestion ('Please enter an application URL ' , 'https://mysite.com ' )
47
44
->expectsConfirmation ('Do you want to generate an admin user? ' )
48
45
->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? ' )
51
47
->expectsConfirmation ('Do you want to install media package? ' )
52
48
->expectsConfirmation ('Do you want to uninstall project-initializator package? ' )
53
49
->assertExitCode (0 );
54
50
}
55
51
56
- public function testRunWithoutAdminAndReadmeCreationConvertAppNameToPascalCase ()
52
+ public function testRunWithoutAdminAndReadmeCreation ()
57
53
{
58
54
$ this ->mockFileGetContent (
59
55
[
@@ -69,6 +65,12 @@ public function testRunWithoutAdminAndReadmeCreationConvertAppNameToPascalCase()
69
65
$ this ->mockFilePutContent (
70
66
'env.example_app_name_pascal_case.yml ' ,
71
67
'env.development_app_name_pascal_case.yml ' ,
68
+ [
69
+ 'renovate.json ' ,
70
+ $ this ->getFixture ('renovate.json ' ),
71
+ 'optionalParameter ' ,
72
+ 'optionalParameter ' ,
73
+ ],
72
74
);
73
75
74
76
$ this ->mockShellExec (
@@ -80,13 +82,13 @@ public function testRunWithoutAdminAndReadmeCreationConvertAppNameToPascalCase()
80
82
);
81
83
82
84
$ 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" ' )
85
86
->expectsOutput ('Project initialized successfully! ' )
86
87
->expectsQuestion ('Please enter an application URL ' , 'https://mysite.com ' )
87
88
->expectsConfirmation ('Do you want to generate an admin user? ' )
88
89
->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 ' )
90
92
->expectsConfirmation ('Do you want to install media package? ' )
91
93
->expectsConfirmation ('Do you want to uninstall project-initializator package? ' )
92
94
->assertExitCode (0 );
0 commit comments