/** * is $eventName the name of an Event class? * * @param mixed $eventName * the data to check * @return boolean * TRUE if $eventName is the name of an Event class * FALSE otherwise */ public static function check($eventName) { // we only want valid class names, not compatible objects if (!IsDefinedClass::check($eventName)) { return false; } return IsCompatibleWith::check($eventName, Event::class); }
/** * @covers ::nothingMatchesTheInputType * @dataProvider provideBadInputs * @expectedException GanbaroDigital\Reflection\Exceptions\E4xx_UnsupportedType */ public function testRejectsEverythingElse($data, $constraint) { // ---------------------------------------------------------------- // setup your test // ---------------------------------------------------------------- // perform the change IsCompatibleWith::check($data, $constraint); }