public function testKeyedInjection() { RuleCollection::define('Stub\\MixedConstructor', [':val2' => 'test1', ':val1' => 'test2']); $Instance = (new Injector())->make('Stub\\MixedConstructor'); $this->assertEquals('test1', $Instance->getVal2()); $this->assertEquals('test2', $Instance->getVal1()); }
public function define($alias, $parameters, $share = false) { RuleCollection::define($alias, $parameters, $share); }