Checks whether the given class string is a subclass of this class.
public isSubclassOf ( string $className ) : boolean | ||
$className | string | |
return | boolean |
public function isSubclassOf(string $className) : bool { return $this->reflectionClass->isSubclassOf($className); }
/** * {@inheritDoc} */ public function isSubclassOf($class) { return $this->betterReflectionClass->isSubclassOf($class); }
function it_might_be_a_subclass_of_another_class(ReflectionClass $reflectionClass) { $reflectionClass->isSubclassOf('stdClass')->willReturn(false); $this->isSubclassOf('stdClass')->shouldBe(false); $reflectionClass->isSubclassOf('stdClass')->willReturn(true); $this->isSubclassOf('stdClass')->shouldBe(true); }