Skip to content

Commit 6a18e82

Browse files
committed
test: Reduce the search depth
1 parent 0e64944 commit 6a18e82

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

system/Commands/Translation/LocalizationFinder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public function run(array $params)
5555
$countNewKeys = 0;
5656

5757
if (ENVIRONMENT === 'testing') {
58-
$currentDir = SUPPORTPATH;
59-
$this->languagePath = $currentDir . 'Language/';
58+
$currentDir = SUPPORTPATH . 'Services/';
59+
$this->languagePath = SUPPORTPATH . 'Language/';
6060
}
6161

6262
if (is_string($cliOptionLocale)) {

tests/system/Commands/Translation/LocalizationFinderTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testUpdateDefaultLocale(): void
4141
{
4242
@mkdir(self::$languageTestPath . self::$locale, 0777, true);
4343
Services::commands()->run('lang:find', [
44-
'dir' => 'Services/Translation',
44+
'dir' => 'Translation',
4545
]);
4646
$this->realizeAssertion();
4747
$this->clearGeneratedFiles();
@@ -52,7 +52,7 @@ public function testUpdateWithLocaleOption(): void
5252
self::$locale = config(App::class)->supportedLocales[0];
5353
@mkdir(self::$languageTestPath . self::$locale, 0777, true);
5454
Services::commands()->run('lang:find', [
55-
'dir' => 'Services/Translation',
55+
'dir' => 'Translation',
5656
'locale' => self::$locale,
5757
]);
5858
$this->realizeAssertion();
@@ -64,7 +64,7 @@ public function testUpdateWithIncorrectLocaleOption(): void
6464
self::$locale = 'test_locale_incorrect';
6565
@mkdir(self::$languageTestPath . self::$locale, 0777, true);
6666
$status = Services::commands()->run('lang:find', [
67-
'dir' => 'Services/Translation',
67+
'dir' => 'Translation',
6868
'locale' => self::$locale,
6969
]);
7070
$this->assertSame($status, -1);
@@ -83,7 +83,7 @@ public function testUpdateWithIncorrectDirOption(): void
8383
{
8484
@mkdir(self::$languageTestPath . self::$locale, 0777, true);
8585
$status = Services::commands()->run('lang:find', [
86-
'dir' => 'Services/Translation/NotExistFolder',
86+
'dir' => 'Translation/NotExistFolder',
8787
]);
8888
$this->assertSame($status, -1);
8989
$this->clearGeneratedFiles();
@@ -93,7 +93,7 @@ public function testShowNewTranslation(): void
9393
{
9494
@mkdir(self::$languageTestPath . self::$locale, 0777, true);
9595
Services::commands()->run('lang:find', [
96-
'dir' => 'Services/Translation',
96+
'dir' => 'Translation',
9797
'show-new' => null,
9898
]);
9999
$this->assertStringContainsString($this->getActualTableWithNewKeys(), $this->getStreamFilterBuffer());

0 commit comments

Comments
 (0)