lithium\test\Unit::assertStringEndsWith PHP Method

assertStringEndsWith() public method

$this->assertStringEndsWith('bar', 'foobar'); // succeeds $this->assertStringEndsWith('foo', 'foobar'); // fails
public assertStringEndsWith ( string $expected, string $actual, string | boolean $message = '{:message}' ) : boolean
$expected string The suffix to check for.
$actual string
$message string | boolean
return boolean `true` if the assertion succeeded, `false` otherwise.
    public function assertStringEndsWith($expected, $actual, $message = '{:message}')
    {
        return $this->assert(preg_match("/{$expected}\$/", $actual, $matches) === 1, $message, array('expected' => $expected, 'result' => $actual));
    }