/** * Asserts that the contents of a string is equal * to the contents of a file. * * @param string $expectedFile * @param string $actualString * @param string $message * @param boolean $canonicalize * @param boolean $ignoreCase * @since Method available since Release 3.3.0 */ function assertStringEqualsFile($expectedFile, $actualString, $message = '', $canonicalize = FALSE, $ignoreCase = FALSE) { return PHPUnit_Framework_Assert::assertStringEqualsFile($expectedFile, $actualString, $message, $canonicalize, $ignoreCase); }
public function isEqualToFile($file) { Assert::assertStringEqualsFile($file, $this->actual, $this->description); return $this; }
/** * Expect that the contents of one file or a string is equal to the contents of another file. * * @param string $expected * @param string $message * @param bool $canonicalize * @param bool $ignoreCase * * @return Expect */ public function toEqualFile($expected, $message = '', $canonicalize = false, $ignoreCase = false) { if (file_exists($this->value)) { // file Assert::assertFileEquals($expected, $this->value, $message, $canonicalize, $ignoreCase); } else { // string Assert::assertStringEqualsFile($expected, $this->value, $message, $canonicalize, $ignoreCase); } return $this; }
public function equalsFile($file) { a::assertStringEqualsFile($file, $this->actual, $this->description); }
/** * Asserts that the contents of a string is equal * to the contents of a vfs file. * * @param $expectedFile * @param $actualString * @param string $message * @param bool|false $canonicalize * @param bool|false $ignoreCase */ public function assertStringEqualsVfsFile($expectedFile, $actualString, $message = '', $canonicalize = false, $ignoreCase = false) { PHPUnit::assertStringEqualsFile($expectedFile, $actualString, $message, $canonicalize, $ignoreCase); }