@@ -22,30 +22,30 @@ protected function tearDown(): void
2222 {
2323 parent ::tearDown ();
2424 File::deleteDirectory (config_path ());
25- File::deleteDirectory (resource_path ( ));
25+ File::deleteDirectory (base_path ( ' lang ' ));
2626 File::delete (base_path ('composer.json ' ));
2727 }
2828
2929 /** @test */
3030 function it_installs_supported_language ()
3131 {
32- $ this ->assertFalse (File::exists (resource_path ( ' lang/ xx_GB ' )));
33- $ this ->assertFalse (File::exists (resource_path ( ' lang/ xx_GB/auth.php ' )));
34- $ this ->assertFalse (File::exists (resource_path ( ' lang/ xx_GB/passwords.php ' )));
35- $ this ->assertFalse (File::exists (resource_path ( ' lang/ xx_GB/pagination.php ' )));
36- $ this ->assertFalse (File::exists (resource_path ( ' lang/ xx_GB/validation.php ' )));
37- $ this ->assertFalse (File::exists (resource_path ( ' lang/ xx_GB.json ' )));
32+ $ this ->assertFalse (File::exists (lang_path ( ' xx_GB ' )));
33+ $ this ->assertFalse (File::exists (lang_path ( ' xx_GB/auth.php ' )));
34+ $ this ->assertFalse (File::exists (lang_path ( ' xx_GB/passwords.php ' )));
35+ $ this ->assertFalse (File::exists (lang_path ( ' xx_GB/pagination.php ' )));
36+ $ this ->assertFalse (File::exists (lang_path ( ' xx_GB/validation.php ' )));
37+ $ this ->assertFalse (File::exists (lang_path ( ' xx_GB.json ' )));
3838
3939 $ this ->artisan ('lang:add xx_GB ' )
4040 ->expectsOutput ("Language [xx_GB] installed successfully as default. " )
4141 ->doesntExpectOutput ("Language [es] installed successfully as default. " );
4242
43- $ this ->assertTrue (File::exists (resource_path ( ' lang/ xx_GB ' )));
44- $ this ->assertTrue (File::exists (resource_path ( ' lang/ xx_GB/auth.php ' )));
45- $ this ->assertTrue (File::exists (resource_path ( ' lang/ xx_GB/passwords.php ' )));
46- $ this ->assertTrue (File::exists (resource_path ( ' lang/ xx_GB/pagination.php ' )));
47- $ this ->assertTrue (File::exists (resource_path ( ' lang/ xx_GB/validation.php ' )));
48- $ this ->assertTrue (File::exists (resource_path ( ' lang/ xx_GB.json ' )));
43+ $ this ->assertTrue (File::exists (lang_path ( ' xx_GB ' )));
44+ $ this ->assertTrue (File::exists (lang_path ( ' xx_GB/auth.php ' )));
45+ $ this ->assertTrue (File::exists (lang_path ( ' xx_GB/passwords.php ' )));
46+ $ this ->assertTrue (File::exists (lang_path ( ' xx_GB/pagination.php ' )));
47+ $ this ->assertTrue (File::exists (lang_path ( ' xx_GB/validation.php ' )));
48+ $ this ->assertTrue (File::exists (lang_path ( ' xx_GB.json ' )));
4949 }
5050
5151 /** @test */
@@ -56,12 +56,12 @@ function it_installs_supported_language_with_validation_inline()
5656
5757 $ this ->assertStringContainsString (
5858 'El campo debe ser verdadero o falso. ' ,
59- File::get (resource_path ( ' lang/ es/validation.php ' ))
59+ File::get (lang_path ( ' es/validation.php ' ))
6060 );
6161
6262 $ this ->assertStringNotContainsString (
6363 'El campo :attribute debe tener un valor verdadero o falso. ' ,
64- File::get (resource_path ( ' lang/ es/validation.php ' ))
64+ File::get (lang_path ( ' es/validation.php ' ))
6565 );
6666 }
6767
@@ -75,11 +75,11 @@ function it_installs_spanish_language_by_default()
7575 /** @test */
7676 function it_doesnt_install_language_if_not_supported ()
7777 {
78- $ this ->assertFalse (File::exists (resource_path ( ' lang/ no_valid ' )));
78+ $ this ->assertFalse (File::exists (lang_path ( ' no_valid ' )));
7979 $ this ->artisan ('lang:add no-valid ' )
8080 ->expectsOutput ("Language [no-valid] is not supported! " );
8181
82- $ this ->assertFalse (File::exists (resource_path ( ' lang/ no_valid ' )));
82+ $ this ->assertFalse (File::exists (lang_path ( ' no_valid ' )));
8383
8484 $ this ->artisan ('lang:add es ' )
8585 ->doesntExpectOutput ("Language [es] is not supported! " );
@@ -125,7 +125,7 @@ function it_installs_json_locale_only_with_base_translations()
125125JSON ;
126126 $ this ->assertEquals (
127127 $ expected ,
128- File::get (resource_path ( ' lang/ es.json ' ))
128+ File::get (lang_path ( ' es.json ' ))
129129 );
130130
131131 $ this ->artisan ('lang:add xx_GB ' );
@@ -139,7 +139,7 @@ function it_installs_json_locale_only_with_base_translations()
139139JSON ;
140140 $ this ->assertEquals (
141141 $ expected ,
142- File::get (resource_path ( ' lang/ xx_GB.json ' ))
142+ File::get (lang_path ( ' xx_GB.json ' ))
143143 );
144144 }
145145
@@ -164,7 +164,7 @@ function it_installs_json_with_base_plus_discovered_packages_one()
164164JSON ;
165165 $ this ->assertEquals (
166166 $ expected ,
167- File::get (resource_path ( ' lang/ es.json ' ))
167+ File::get (lang_path ( ' es.json ' ))
168168 );
169169
170170 }
@@ -190,7 +190,7 @@ function it_installs_json_with_base_plus_discovered_packages_other()
190190JSON ;
191191 $ this ->assertEquals (
192192 $ expected ,
193- File::get (resource_path ( ' lang/ es.json ' ))
193+ File::get (lang_path ( ' es.json ' ))
194194 );
195195
196196 }
@@ -218,7 +218,7 @@ function it_installs_json_with_base_plus_discovered_packages_mixed()
218218JSON ;
219219 $ this ->assertEquals (
220220 $ expected ,
221- File::get (resource_path ( ' lang/ es.json ' ))
221+ File::get (lang_path ( ' es.json ' ))
222222 );
223223
224224 }
0 commit comments