function isSupertype($class, $type) { $supertypes = array_merge(array($class), static::$reflection->interfacesOf($class), static::$reflection->parentsOf($class)); return in_array($type, $supertypes); }
function testCanFindInterfacesOfImp2() { $this->assertEquals(array('phemto\\A', 'phemto\\B'), $this->cache->interfacesOf('phemto\\Imp2')); }