本文整理汇总了PHP中PHPUnit_Framework_Assert::assertStringEqualsFile方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Framework_Assert::assertStringEqualsFile方法的具体用法?PHP PHPUnit_Framework_Assert::assertStringEqualsFile怎么用?PHP PHPUnit_Framework_Assert::assertStringEqualsFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Framework_Assert
的用法示例。
在下文中一共展示了PHPUnit_Framework_Assert::assertStringEqualsFile方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: assertStringEqualsFile
/**
* 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);
}
示例2: isEqualToFile
public function isEqualToFile($file)
{
Assert::assertStringEqualsFile($file, $this->actual, $this->description);
return $this;
}
示例3: toEqualFile
/**
* 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;
}
示例4: equalsFile
public function equalsFile($file)
{
a::assertStringEqualsFile($file, $this->actual, $this->description);
}
示例5: assertStringEqualsVfsFile
/**
* 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);
}