lithium\test\Unit::assertFileNotEquals()
Assert that the file contents of $expected
are not equal to the contents of $actual
.
$this->assertFileNotEquals('/tmp/foo.txt', '/tmp/bar.txt'); // succeeds
$this->assertFileNotEquals('/tmp/foo.txt', '/tmp/foo.txt'); // fails
Parameters
-
string
$expected
Absolute path to the expected file.
-
string
$actual
Absolute path to the actual file.
-
string|boolean
$message
Returns
booleantrue
if the assertion succeeded, false
otherwise.
Source
public function assertFileNotEquals($expected, $actual, $message = '{:message}') {
$expected = md5_file($expected);
$result = md5_file($actual);
return $this->assert($expected !== $result, $message, compact('expected', 'result'));
}