Skip to content

Commit 0f20dfe

Browse files
committed
revert sync command test
1 parent 950038b commit 0f20dfe

File tree

3 files changed

+3
-27
lines changed

3 files changed

+3
-27
lines changed

src/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct(Filesystem $disk, $path, array $syncPaths)
5353
*/
5454
public function files()
5555
{
56-
$files = Collection::make($this->disk->syncPaths($this->path));
56+
$files = Collection::make($this->disk->allFiles($this->path));
5757

5858
$filesByFile = $files->groupBy(function ($file) {
5959
$fileName = $file->getBasename('.'.$file->getExtension());

tests/SyncCommandTest.php

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,6 @@ public function testCommandOutputForFile()
1111
file_put_contents(__DIR__.'/views_temp/user.blade.php', '{{ trans(\'user.name\') }} {{ trans(\'user.age\') }}');
1212
mkdir(__DIR__.'/views_temp/user');
1313
file_put_contents(__DIR__.'/views_temp/user/index.blade.php', "{{ trans('user.city') }} {{ trans('user.code.initial') }}");
14-
15-
array_map('unlink', glob(__DIR__.'/app_temp/Http/Controllers/testController.php'));
16-
array_map('unlink', glob(__DIR__.'/app_temp/Jobs/testJob.php'));
17-
array_map('rmdir', glob(__DIR__.'/app_temp/Http/Controllers'));
18-
array_map('rmdir', glob(__DIR__.'/app_temp/Http'));
19-
array_map('rmdir', glob(__DIR__.'/app_temp/Jobs'));
20-
mkdir(__DIR__.'/app_temp/Http');
21-
mkdir(__DIR__.'/app_temp/Http/Controllers');
22-
mkdir(__DIR__.'/app_temp/Jobs');
23-
24-
25-
file_put_contents(__DIR__.'/app_temp/Http/Controllers/testController.php', "<?php class testController{ public function index() { return Lang::get('user.first_name'); } }");
26-
27-
file_put_contents(__DIR__.'/app_temp/Jobs/testJob.php', "<?php class testJob{ public function index() { return Lang::get('user.last_name'); } }");
2814

2915
$this->createTempFiles([
3016
'en' => ['user' => "<?php\n return ['name' => 'Name'];"],
@@ -40,15 +26,11 @@ public function testCommandOutputForFile()
4026
$this->assertArrayHasKey('initial', $userENFile['code']);
4127
$this->assertArrayHasKey('age', $userENFile);
4228
$this->assertArrayHasKey('city', $userENFile);
43-
$this->assertArrayHasKey('first_name', $userENFile);
44-
$this->assertArrayHasKey('last_name', $userENFile);
4529
$this->assertArrayHasKey('name', $userNlFile);
4630
$this->assertArrayHasKey('initial', $userNlFile['code']);
4731
$this->assertArrayHasKey('age', $userNlFile);
4832
$this->assertArrayHasKey('city', $userNlFile);
49-
$this->assertArrayHasKey('first_name', $userNlFile);
50-
$this->assertArrayHasKey('last_name', $userNlFile);
51-
33+
5234
array_map('unlink', glob(__DIR__.'/views_temp/user/index.blade.php'));
5335
array_map('rmdir', glob(__DIR__.'/views_temp/user'));
5436
array_map('unlink', glob(__DIR__.'/views_temp/user.blade.php'));

tests/TestCase.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,7 @@ protected function getPackageProviders($app)
1212
protected function getEnvironmentSetUp($app)
1313
{
1414
$app['config']->set('langman.path', __DIR__.'/temp');
15-
// here we put the app temp with views path , because the app_path in
16-
// service porovider pass wrong app path of laravel, but we need to
17-
// check if the app_temp directory exists or not
18-
if (!is_dir(__DIR__.'/app_temp')) {
19-
mkdir(__DIR__.'/app_temp');
20-
}
21-
$app['config']->set('view.paths', [__DIR__.'/views_temp',__DIR__.'/app_temp']);
15+
$app['config']->set('view.paths', [__DIR__.'/views_temp']);
2216
}
2317

2418
public function setUp()

0 commit comments

Comments
 (0)