Пример #1
0
 protected function createMatcher()
 {
     return Hamcrest_Core_IsInstanceOf::anInstanceOf('stdClass');
 }
Пример #2
0
/**
 * Is the value an instance of a particular type?
 * This version assumes no relationship between the required type and
 * the signature of the method that sets it up, for example in
 * <code>assertThat($anObject, anInstanceOf('Thing'));</code>
 */
function any($theClass)
{
    require_once 'Hamcrest/Core/IsInstanceOf.php';
    return Hamcrest_Core_IsInstanceOf::anInstanceOf($theClass);
}