lithium\test\Unit::assertNotInstanceOf()
Assert that $actual
is not an instance of $expected
.
$this->assertNotInstanceOf('ReflectionClass', new stdClass); // succeeds
$this->assertNotInstanceOf('stdClass', new stdClass); // fails
Parameters
-
string
$expected
Fully namespaced expected class.
-
object
$actual
Object you are testing.
-
string|boolean
$message
Returns
booleantrue
if the assertion succeeded, false
otherwise.
Source
public function assertNotInstanceOf($expected, $actual, $message = '{:message}') {
return $this->assert(!is_a($actual, $expected), $message, array(
'expected' => $expected,
'result' => is_object($actual) ? get_class($actual) : gettype($actual),
));
}