lithium\test\Unit::assertTrue()

public method

Assert that the result is strictly true.

$this->assertTrue(true, 'Boolean true'); // succeeds
$this->assertTrue('false', 'String has content'); // fails
$this->assertTrue(10, 'Non-Zero value'); // fails

Parameters

  • mixed $result
  • string $message

Returns

boolean

true if the assertion succeeded, false otherwise.

Source

	public function assertTrue($result, $message = '{:message}') {
		$expected = true;
		return $this->assert($result === $expected, $message, compact('expected', 'result'));
	}