Assert\Assertion::notSame PHP 메소드

notSame() 공개 정적인 메소드

Assert that two values are not the same (using === ).
public static notSame ( mixed $value1, mixed $value2, string | null $message = null, string | null $propertyPath = null ) : boolean
$value1 mixed
$value2 mixed
$message string | null
$propertyPath string | null
리턴 boolean
    public static function notSame($value1, $value2, $message = null, $propertyPath = null)
    {
        if ($value1 === $value2) {
            $message = sprintf($message ?: 'Value "%s" is the same as expected value "%s".', static::stringify($value1), static::stringify($value2));
            throw static::createException($value1, $message, static::INVALID_NOT_SAME, $propertyPath, array('expected' => $value2));
        }
        return true;
    }

Usage Example

예제 #1
0
 /**
  * @Then /^the command was not successful$/
  */
 public function theCommandWasNotSuccessful()
 {
     Assertion::notSame($this->tester->getStatusCode(), 0);
 }
All Usage Examples Of Assert\Assertion::notSame