\Cake\TestSuiteStringCompareTrait

Compare a string to the contents of a file

Implementing objects are expected to modify the $_compareBasePath property before use.

Summary

Methods
Properties
Constants
assertSameAsFile()
No public properties found
No constants found
No protected methods found
$_compareBasePath
$_updateComparisons
N/A
No private methods found
No private properties found
N/A

Properties

$_compareBasePath

$_compareBasePath : string

The base path for output comparisons

Must be initialized before use

Type

string

$_updateComparisons

$_updateComparisons : boolean

Update comparisons to match test changes

Initialized with the env variable UPDATE_TEST_COMPARISON_FILES

Type

boolean

Methods

assertSameAsFile()

assertSameAsFile(string  $path, string  $result) : void

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