summaryrefslogtreecommitdiff
path: root/tests/Unit/Helpers/Translation/TranslationServiceProviderTest.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2019-10-13 13:43:08 +0200
committermsquare <msquare@notrademark.de>2019-10-13 13:43:08 +0200
commitc0e97bfe753013b115345b00cbfd9858799a6ac9 (patch)
tree7e98447e4c7d874ec27e26801771086843f3efc3 /tests/Unit/Helpers/Translation/TranslationServiceProviderTest.php
parent285f5509dd948c2359c861eec364a677e8ce4910 (diff)
parent7a2427e70296ef652f76fe2e2edc47d2e0f70f5a (diff)
Password recovery rebuild, correctly translated Mails and some minor fixes #658
Diffstat (limited to 'tests/Unit/Helpers/Translation/TranslationServiceProviderTest.php')
-rw-r--r--tests/Unit/Helpers/Translation/TranslationServiceProviderTest.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/Unit/Helpers/Translation/TranslationServiceProviderTest.php b/tests/Unit/Helpers/Translation/TranslationServiceProviderTest.php
index dc8e8af5..e55fdf02 100644
--- a/tests/Unit/Helpers/Translation/TranslationServiceProviderTest.php
+++ b/tests/Unit/Helpers/Translation/TranslationServiceProviderTest.php
@@ -21,7 +21,7 @@ class TranslationServiceProviderTest extends ServiceProviderTest
$locales = ['fo_OO' => 'Foo', 'fo_OO.BAR' => 'Foo (Bar)', 'te_ST.WTF-9' => 'WTF\'s Testing?'];
$config = new Config(['locales' => $locales, 'default_locale' => $defaultLocale]);
- $app = $this->getApp(['make', 'instance', 'get']);
+ $app = $this->getApp(['make', 'singleton', 'alias', 'get']);
/** @var Session|MockObject $session */
$session = $this->createMock(Session::class);
/** @var Translator|MockObject $translator */
@@ -60,12 +60,16 @@ class TranslationServiceProviderTest extends ServiceProviderTest
)
->willReturn($translator);
- $app->expects($this->exactly(2))
- ->method('instance')
- ->withConsecutive(
- [Translator::class, $translator],
- ['translator', $translator]
- );
+ $app->expects($this->once())
+ ->method('singleton')
+ ->willReturnCallback(function (string $abstract, callable $callback) use ($translator) {
+ $this->assertEquals(Translator::class, $abstract);
+ $this->assertEquals($translator, $callback());
+ });
+
+ $app->expects($this->once())
+ ->method('alias')
+ ->with(Translator::class, 'translator');
$serviceProvider->register();
}