FileEqualsFile
extends Constraint
in package
FinalYes
Compares two files byte-for-byte.
The expected file is passed to the constructor. The actual value passed to Constraint::evaluate() may be a SplFileInfo or a path string. Both files must exist. If both values resolve to the same real path, the comparison succeeds without reading the file contents.
Table of Contents
Constants
- DEFAULT_ROW_LENGTH : mixed = 128
Methods
- __construct() : mixed
- evaluate() : bool|null
- toString() : string
Constants
DEFAULT_ROW_LENGTH
public
mixed
DEFAULT_ROW_LENGTH
= 128
Methods
__construct()
public
__construct(SplFileInfo|string $file[, int $rowLength = self::DEFAULT_ROW_LENGTH ]) : mixed
Parameters
- $file : SplFileInfo|string
- $rowLength : int = self::DEFAULT_ROW_LENGTH
evaluate()
public
evaluate(mixed $other[, string $description = '' ][, bool $returnResult = false ]) : bool|null
Parameters
- $other : mixed
- $description : string = ''
- $returnResult : bool = false
Return values
bool|nulltoString()
public
toString() : string