lithium\test\Unit::assertNotInternalType()

public method

Assert that $actual is not of given type.

$this->assertNotInternalType('integer', 'foobar'); // succeeds
$this->assertNotInternalType('string', 'foobar'); // fails

Parameters

  • string $expected

    Internal type.

  • object $actual

    Object you are testing.

  • string|boolean $message

Returns

boolean

true if the assertion succeeded, false otherwise.

Source

	public function assertNotInternalType($expected, $actual, $message = '{:message}') {
		$method = static::$_internalTypes[$expected];
		return $this->assert(!$method($actual), $message, [
			'expected' => $expected,
			'result' => gettype($actual)
		]);
	}