示例#1
0
文件: phpString.php 项目: atoum/atoum
 public function isEqualToContentsOfFile($path, $failMessage = null)
 {
     $this->valueIsSet();
     $fileContents = @file_get_contents($path);
     if ($fileContents === false) {
         $this->fail($this->_('Unable to get contents of file %s', $path));
     } else {
         return parent::isEqualTo($fileContents, $failMessage ?: $this->_('string is not equal to contents of file %s', $path));
     }
 }