Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Commit e0a3186

Browse files
committed
Removed invalid test case in factories and added callback factory
1 parent a72dd50 commit e0a3186

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/FactoryTestTrait.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,14 @@ public function factoryWithName() : Generator
4646
yield 'invokable' => [['factories' => ['service' => TestAsset\FactoryWithName::class]]];
4747
yield 'invokable-array' => [['factories' => ['service' => [TestAsset\FactoryStatic::class, 'withName']]]];
4848
yield 'invokable-string' => [['factories' => ['service' => TestAsset\FactoryStatic::class . '::withName']]];
49-
yield 'alias' => [
49+
yield 'invokable-callback' => [
5050
[
51-
'factories' => ['service' => 'factory'],
52-
'services' => ['factory' => new TestAsset\FactoryWithName()],
53-
]
51+
'factories' => [
52+
'service' => function () {
53+
return func_get_args();
54+
},
55+
],
56+
],
5457
];
5558
}
5659

0 commit comments

Comments
 (0)