1 | <?php |
||
5 | trait TesterTrait |
||
6 | { |
||
7 | /** |
||
8 | * @var string[] pairs of user_name => oauth2_token for oauth2 auth. |
||
9 | */ |
||
10 | protected static $tokens = []; |
||
11 | |||
12 | /** |
||
13 | * @var string identificator for the auth/logged user. |
||
14 | */ |
||
15 | protected $loggedUsername; |
||
16 | |||
17 | /** |
||
18 | * Saves a token and user by an unique name. |
||
19 | * |
||
20 | * @param string $tokenName unique name to index the tokens and models |
||
21 | * @param string $token oauth2 authorization token |
||
22 | * @param UserIdentity $user |
||
|
|||
23 | */ |
||
24 | public function storeToken($tokenName, $token) |
||
28 | |||
29 | /** |
||
30 | * Authenticates a user stored in `$tokens` |
||
31 | * |
||
32 | * @param string $tokenName |
||
33 | */ |
||
34 | public function amAuthByToken($tokenName) |
||
38 | |||
39 | /** |
||
40 | * Checks over the HTTP pagination headers and (optionally) its values. |
||
41 | */ |
||
42 | public function seePaginationHttpHeaders() |
||
49 | |||
50 | /** |
||
51 | * Checks over the HTTP content type header value. |
||
52 | */ |
||
53 | public function seeContentTypeHttpHeader( |
||
58 | } |
||
59 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.