This check compares calls to functions or methods with their respective definitions.
If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the
check may pick up the wrong definition and report false positives. One codebase
where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.
Loading history...
64
}
65
66
return $this;
67
}
68
69
/**
70
* Asserts that the response contains the given header and equals the optional value.
71
*
72
* @param string $headerName
73
* @param mixed $value
74
* @return $this
75
*/
76
public function assertHeader($headerName, $value = null)
77
{
78
79
PHPUnit::assertTrue(
80
$this->hasHeader($headerName),
81
"Header [{$headerName}] not present on response."
82
);
83
84
$actual = $this->getHeader($headerName);
85
86
if (! is_null($value)) {
87
$message = sprintf(
88
"Header [%s] was found, but value(s) [%s] does not match [%s].",
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.