Skip to content

Commit 3ad1042

Browse files
committed
Update units
1 parent 7604a8a commit 3ad1042

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tests/Unit/Business/Provider/LoggerProviderTest.php

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function testGetLoggerWhenOnlyOneproviderRegistered(): void
6363
->expects($this->once())
6464
->method('plugins')
6565
->with(LoggerProviderPluginInterface::class)
66-
->willReturn([$this->loggerProviderPlugin]);
66+
->willReturn(new \ArrayObject([$this->loggerProviderPlugin]));
6767

6868
$this->loggerFactory
6969
->expects($this->once())
@@ -121,10 +121,10 @@ public function testGetLoggerWhenManyOneProviderRegistered(bool $shouldAdaptedNo
121121
->expects($this->once())
122122
->method('plugins')
123123
->with(LoggerProviderPluginInterface::class)
124-
->willReturn([
124+
->willReturn(new \ArrayObject([
125125
$providerNotUsed,
126126
$this->loggerProviderPlugin,
127-
]);
127+
]));
128128

129129
if (!$shouldAdaptedNotFoundException) {
130130
$this->loggerFactory
@@ -163,10 +163,10 @@ public function testGetLoggerNotRegisteredAdapterThrowsException(): void
163163
$this->kernel
164164
->expects($this->once())
165165
->method('plugins')
166-
->willReturn([
166+
->willReturn(new \ArrayObject([
167167
$this->loggerProviderPlugin,
168168
$this->loggerProviderPlugin,
169-
])
169+
]))
170170
;
171171

172172
$this->loggerProvider->getLogger('loggerName');
@@ -183,9 +183,9 @@ public function testAdapterNameInvalidThrowsException(): void
183183
$this->kernel
184184
->expects($this->once())
185185
->method('plugins')
186-
->willReturn([
186+
->willReturn(new \ArrayObject([
187187
$this->loggerProviderPlugin,
188-
])
188+
]))
189189
;
190190

191191
$this->loggerProvider->getLogger('loggerName');
@@ -197,8 +197,7 @@ public function testAdapterAlreadyRegisteredThrowsException(): void
197197
$this->kernel
198198
->expects($this->once())
199199
->method('plugins')
200-
->willReturn([
201-
])
200+
->willReturn(new \ArrayObject([]))
202201
;
203202

204203
$this->loggerProvider->getLogger('loggerName');

0 commit comments

Comments
 (0)