src/Assert.php
public static function assertInstanceOf(string $className, $actual, string $message = '')
    {
        self::$count += 1;

        if ($actual instanceof $className) {
            return;
        }

        if (!$message) {
            $message = sprintf(
                'Failed asserting that %s is an instance of %s',
                static::getType($actual),
                $className
            );
        }
        throw new AssertionError($message);
    }
public static function assertInstanceOf(string $className, $actual, string $message = '')
    {
        self::$count += 1;

        if ($actual instanceof $className) {
            return;
        }

        if (!$message) {
            $message = sprintf(
                'Failed asserting that %s is an instance of %s',
                static::getType($actual),
                $className
            );
        }
        throw new AssertionError($message);
    }
public static function assertInstanceOf ( string $ className , $ actual , string $ message = '' ) { self :: $ count += 1 ; if ( $ actual instanceof $ className ) { return ; } if ( ! $ message ) { $ message = sprintf ( 'Failed asserting that %s is an instance of %s' , static :: getType ( $ actual ) , $ className ) ; } throw new AssertionError ( $ message ) ; }
Test if the given object is an instance of the given class

@example
\Cundd\TestFlight\Assert::assertInstanceOf(stdClass::class, new stdClass());
\Cundd\TestFlight\Assert::assertInstanceOf('stdClass', new stdClass());
test_flight_throws(function() { \Cundd\TestFlight\Assert::assertInstanceOf('stdClass', new Exception()); });

@param string $className
@param mixed  $actual
@param string $message
@throws AssertionError
Test if the given object is an instance of the given class