Exemplo n.º 1
0
 public function testGetTypeReflections()
 {
     $reflectedMethod = new MethodReflection('TRex\\Reflection\\resources\\Foo', 'getBar');
     $this->assertCount(2, $reflectedMethod->getTypeReflections());
     $this->assertInstanceOf('TRex\\Reflection\\TypeReflection', $reflectedMethod->getTypeReflections()[0]);
     $this->assertSame(TypeReflection::STRING_TYPE, $reflectedMethod->getTypeReflections()[0]->getStandardizedType());
     $this->assertInstanceOf('TRex\\Reflection\\TypeReflection', $reflectedMethod->getTypeReflections()[1]);
     $this->assertSame(TypeReflection::NULL_TYPE, $reflectedMethod->getTypeReflections()[1]->getStandardizedType());
 }