lithium\test\Unit::assertInternalType()
Assert that $actual
is of given type.
$this->assertInternalType('string', 'foobar'); // succeeds
$this->assertInternalType('integer', 'foobar'); // fails
Parameters
-
string
$expected
Internal type.
-
object
$actual
Object you are testing.
-
string|boolean
$message
Returns
booleantrue
if the assertion succeeded, false
otherwise.
Source
public function assertInternalType($expected, $actual, $message = '{:message}') {
$method = static::$_internalTypes[$expected];
return $this->assert($method($actual), $message, [
'expected' => $expected,
'result' => gettype($actual)
]);
}