PHPUnit_Framework_Assert::assertNotInternalType PHP Method

assertNotInternalType() public static method

Asserts that a variable is not of a given type.
public static assertNotInternalType ( string $expected, mixed $actual, string $message = '' )
$expected string
$actual mixed
$message string
    public static function assertNotInternalType($expected, $actual, $message = '')
    {
        if (!is_string($expected)) {
            throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
        }
        $constraint = new PHPUnit_Framework_Constraint_Not(new PHPUnit_Framework_Constraint_IsType($expected));
        static::assertThat($actual, $constraint, $message);
    }

Usage Example

Example #1
0
/**
 * Asserts that a variable is not of a given type.
 *
 * @param string $expected
 * @param mixed  $actual
 * @param string $message
 * @since Method available since Release 3.5.0
 */
function assertNotInternalType($expected, $actual, $message = '')
{
    return PHPUnit_Framework_Assert::assertNotInternalType($expected, $actual, $message);
}
All Usage Examples Of PHPUnit_Framework_Assert::assertNotInternalType
PHPUnit_Framework_Assert