PHPUnit_Framework_Assert::assertStringEqualsFile PHP Method

assertStringEqualsFile() public static method

Asserts that the contents of a string is equal to the contents of a file.
public static assertStringEqualsFile ( string $expectedFile, string $actualString, string $message = '', boolean $canonicalize = false, boolean $ignoreCase = false )
$expectedFile string
$actualString string
$message string
$canonicalize boolean
$ignoreCase boolean
    public static function assertStringEqualsFile($expectedFile, $actualString, $message = '', $canonicalize = false, $ignoreCase = false)
    {
        static::assertFileExists($expectedFile, $message);
        static::assertEquals(file_get_contents($expectedFile), $actualString, $message, 0, 10, $canonicalize, $ignoreCase);
    }

Usage Example

Example #1
0
/**
 * 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);
}
All Usage Examples Of PHPUnit_Framework_Assert::assertStringEqualsFile
PHPUnit_Framework_Assert