We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 520bb1d commit 306e7a8Copy full SHA for 306e7a8
test/InjectorTest.php
@@ -7,6 +7,13 @@
7
8
class InjectorTest extends TestCase
9
{
10
+ public function testArrayTypehintDoesNotEvaluatesAsClass()
11
+ {
12
+ $injector = new Injector;
13
+ $injector->defineParam('parameter', []);
14
+ $injector->execute('Auryn\Test\hasArrayDependency');
15
+ }
16
+
17
public function testMakeInstanceInjectsSimpleConcreteDependency()
18
19
$injector = new Injector;
test/fixtures.php
@@ -426,6 +426,11 @@ public function __invoke()
426
}
427
428
429
+function hasArrayDependency(array $parameter)
430
+{
431
+ return 42;
432
+}
433
434
function testExecuteFunction()
435
436
return 42;
0 commit comments