Skip to content

Commit d4c6833

Browse files
committed
cover missing lines
Signed-off-by: alexmerlin <alex.merlin.1985@gmail.com>
1 parent 327f1ea commit d4c6833

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

test/Factory/AttributedServiceFactoryTest.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,15 @@ public function testWillThrowExceptionOnRecursiveInjection(): void
9696
public function testWillThrowExceptionIfDottedServiceNotFound(): void
9797
{
9898
$mapping = [
99-
'config' => [],
100-
'uration' => [],
99+
'config' => [
100+
'uration' => [
101+
'test' => [],
102+
],
103+
],
104+
'uration' => [
105+
'test' => [],
106+
],
107+
'key' => [],
101108
];
102109

103110
$container = $this->createMock(ContainerInterface::class);
@@ -114,15 +121,15 @@ function (string $key) use ($mapping): array {
114121

115122
$subject = new class
116123
{
117-
#[Inject('config.key')]
124+
#[Inject('config.uration.key')]
118125
public function __construct(array $config = [])
119126
{
120127
}
121128
};
122129

123130
$this->expectException(InvalidArgumentException::class);
124131
$this->expectExceptionMessage(
125-
sprintf(InvalidArgumentException::MESSAGE_MISSING_KEY, 'config.key')
132+
sprintf(InvalidArgumentException::MESSAGE_MISSING_KEY, 'config.uration.key')
126133
);
127134

128135
(new AttributedServiceFactory())($container, $subject::class);

0 commit comments

Comments
 (0)