lithium\test\Unit::assertNotNull()

public method

Assert that the result is not strictly null.

$this->assertNotNull(1); // succeeds
$this->assertNotNull(null); // fails

Parameters

  • mixed $result
  • string $message

Returns

boolean

true if the assertion succeeded, false otherwise.

Source

	public function assertNotNull($actual, $message = '{:message}') {
		return $this->assert($actual !== null, $message, array(
			'expected' => null,
			'actual' => gettype($actual)
		));
	}