assertJsonStringNotEqualsJsonFile() public static method

Asserts that the generated JSON encoded object and the content of the given file are not equal.
public static assertJsonStringNotEqualsJsonFile ( string $expectedFile, string $actualJson, string $message = '' )
$expectedFile string
$actualJson string
$message string
Exemplo n.º 1
0
 public function isNotEqualToJsonFile($file)
 {
     Assert::assertJsonStringNotEqualsJsonFile($file, $this->actual, $this->description);
     return $this;
 }
Exemplo n.º 2
0
/**
 * Asserts that the generated JSON encoded object and the content of the given file are not equal.
 *
 * @param string $expectedFile
 * @param string $actualJson
 * @param string $message
 * @since Method available since Release 3.7.0
 */
function assertJsonStringNotEqualsJsonFile($expectedFile, $actualJson, $message = '')
{
    return PHPUnit_Framework_Assert::assertJsonStringNotEqualsJsonFile($expectedFile, $actualJson, $message = '');
}
Exemplo n.º 3
0
 /**
  * Expect that the generated JSON encoded object and the content of the given file or JSON string are not equal.
  *
  * @param string $expectedFile
  * @param string $message
  *
  * @return Expect
  */
 public function notToEqualJsonFile($expectedFile, $message = '')
 {
     if (file_exists($this->value)) {
         // file
         Assert::assertJsonFileEqualsJsonFile($expectedFile, $this->value, $message);
     } else {
         // string
         Assert::assertJsonStringNotEqualsJsonFile($expectedFile, $this->value, $message);
     }
     return $this;
 }
Exemplo n.º 4
0
 /**
  * Asserts that the generated JSON encoded object and the content of the given vfs file are not equal.
  *
  * @param $expectedFile
  * @param $actualJson
  * @param string $message
  */
 public function assertJsonStringNotEqualsVfsJsonFile($expectedFile, $actualJson, $message = '')
 {
     PHPUnit::assertJsonStringNotEqualsJsonFile($this->getPath($expectedFile), $actualJson, $message);
 }