Completed
Pull Request — master (#171)
by Corey
02:59
created

MockRequest::validateCsrfToken()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace common\tests\_support;
4
class MockRequest extends \yii\web\Request {
5
6
  public $csrfValidationReturn = true;
7
8
9
  public function setCsrfToken($token) {
10
    $this->_csrfToken = $token;
0 ignored issues
show
Bug Best Practice introduced by
The property $_csrfToken is declared private in yii\web\Request. Since you implement __set, consider adding a @property or @property-write.
Loading history...
11
  }
12
13
  public function validateCsrfToken($clientSuppliedToken = null) {
14
    return $this->csrfValidationReturn;
15
  }
16
}