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());
 }
Beispiel #2
0
 public function define($alias, $parameters, $share = false)
 {
     RuleCollection::define($alias, $parameters, $share);
 }