lithium\test\Unit::assertTrue()
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
booleantrue if the assertion succeeded, false otherwise.
Source
public function assertTrue($result, $message = '{:message}') {
$expected = true;
return $this->assert($result === $expected, $message, compact('expected', 'result'));
}