Trait StringCompareTrait
Compare a string to the contents of a file
Implementing objects are expected to modify the $_compareBasePath
property
before use.
Properties summary
-
$_compareBasePath
protectedstring
The base path for output comparisons -
$_updateComparisons
protectedboolean
Update comparisons to match test changes
Method Summary
-
assertSameAsFile() public
Compare the result to the contents of the file
Method Detail
assertSameAsFile() public ¶
assertSameAsFile( string $path , string $result )
Compare the result to the contents of the file
Parameters
- string $path
- partial path to test comparison file
- string $result
- test result as a string
Properties detail
$_compareBasePath ¶
protected
string
The base path for output comparisons
Must be initialized before use
''
$_updateComparisons ¶
protected
boolean
Update comparisons to match test changes
Initialized with the env variable UPDATE_TEST_COMPARISON_FILES