From 8ad2f751cb8b2145814a9b3ef649e6f7f258488c Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Sat, 18 Jun 2022 00:13:17 +0300 Subject: [PATCH] Fixed tests --- tests/Concerns/TestKeys.php | 4 ++-- tests/InlineOff/Console/Keys/Json/BreezeJsonTest.php | 2 -- tests/InlineOn/Console/Keys/Json/BreezeJsonTest.php | 2 -- tests/TestCase.php | 3 +-- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/Concerns/TestKeys.php b/tests/Concerns/TestKeys.php index d8e8c4f2..891f4ffa 100644 --- a/tests/Concerns/TestKeys.php +++ b/tests/Concerns/TestKeys.php @@ -23,7 +23,7 @@ trait TestKeys { use Backtrace; - protected $trans_prefix; + protected $trans_prefix = null; protected $items = []; @@ -31,7 +31,7 @@ protected function trans(string $key, ?string $locale = null): string { $key = $this->trans_prefix . $key; - return trans($key, [], $locale); + return __($key, [], $locale); } protected function testSame(string $expected, string $key, ?string $locale = null): void diff --git a/tests/InlineOff/Console/Keys/Json/BreezeJsonTest.php b/tests/InlineOff/Console/Keys/Json/BreezeJsonTest.php index 2961c91e..a06c3a8d 100644 --- a/tests/InlineOff/Console/Keys/Json/BreezeJsonTest.php +++ b/tests/InlineOff/Console/Keys/Json/BreezeJsonTest.php @@ -24,8 +24,6 @@ class BreezeJsonTest extends BaseJsonTestCase { protected $items = [ - 'A new verification link has been sent to the email address you provided during registration.' => 'Новая ссылка для подтверждения была отправлена на Ваш email-адрес, указанный при регистрации.', - 'Already registered?' => 'Уже зарегистрированы?', 'Confirm' => 'Подтвердить', 'Confirm Password' => 'Подтверждение пароля', diff --git a/tests/InlineOn/Console/Keys/Json/BreezeJsonTest.php b/tests/InlineOn/Console/Keys/Json/BreezeJsonTest.php index b64aba05..0da6c7b4 100644 --- a/tests/InlineOn/Console/Keys/Json/BreezeJsonTest.php +++ b/tests/InlineOn/Console/Keys/Json/BreezeJsonTest.php @@ -24,8 +24,6 @@ class BreezeJsonTest extends BaseJsonTestCase { protected $items = [ - 'A new verification link has been sent to the email address you provided during registration.' => 'Новая ссылка для подтверждения была отправлена на Ваш email-адрес, указанный при регистрации.', - 'Already registered?' => 'Уже зарегистрированы?', 'Confirm' => 'Подтвердить', 'Confirm Password' => 'Подтверждение пароля', diff --git a/tests/TestCase.php b/tests/TestCase.php index 311aa7e8..c63b8398 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -67,9 +67,8 @@ protected function setUp(): void { parent::setUp(); - $this->reinstallLocales(); - $this->emulatePackages(); + $this->reinstallLocales(); } protected function getPackageProviders($app): array