lithium\test\Unit::assertInternalType PHP Method

assertInternalType() public method

$this->assertInternalType('string', 'foobar'); // succeeds $this->assertInternalType('integer', 'foobar'); // fails
See also: lithium\test\Unit::$_internalTypes
See also: lithium\test\Unit::assert()
public assertInternalType ( string $expected, object $actual, string | boolean $message = '{:message}' ) : boolean
$expected string Internal type.
$actual object Object you are testing.
$message string | boolean
return boolean `true` if the assertion succeeded, `false` otherwise.
    public function assertInternalType($expected, $actual, $message = '{:message}')
    {
        $method = self::$_internalTypes[$expected];
        return $this->assert($method($actual), $message, array('expected' => $expected, 'result' => gettype($actual)));
    }