Example #1
0
 public function testGetTypeOfParameter()
 {
     $params = $this->interface->getMethod('__construct')->getParameters();
     $this->assertEquals('Fixture\\Momonga', (new Type())->getType($params[0]));
     $this->assertEquals('Fixture\\Momonga', (new Type())->getType($params[1]));
     $this->assertNull((new Type())->getType($params[2]));
 }
Example #2
0
 public function testGetInject()
 {
     $this->assertEquals('1st', (new Inject())->getInject($this->interface->getProperty('injectAtFirstLine')));
 }
Example #3
0
 public function testGetNamed()
 {
     $this->assertEquals(['param1' => 'param', 'param2' => 'param', 'param3' => 'param'], (new Named())->getNamed($this->interface->getMethod('__construct')));
     $this->assertEquals(['prop1' => 'prop'], (new Named())->getNamed($this->interface->getProperty('prop1')));
     $this->assertEquals(['1st' => 'ok'], (new Named())->getNamed($this->interface->getProperty('namedAtFirstLine')));
 }