Total Complexity | 3 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class ResetPasswordFormTest extends \Codeception\Test\Unit |
||
13 | { |
||
14 | /** |
||
15 | * @var \frontend\tests\UnitTester |
||
16 | */ |
||
17 | protected $tester; |
||
18 | |||
19 | /** |
||
20 | * @inheritdoc |
||
21 | */ |
||
22 | public function _before() |
||
23 | { |
||
24 | $this->tester->haveFixtures([ |
||
25 | 'user' => [ |
||
26 | 'class' => UserFixture::className(), |
||
27 | 'dataFile' => codecept_data_dir() . 'user.php' |
||
28 | ], |
||
29 | ]); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @inheritdoc |
||
34 | */ |
||
35 | public function testResetWrongToken() |
||
36 | { |
||
37 | $this->tester->expectException('yii\base\InvalidParamException', function() { |
||
38 | new ResetPasswordForm(''); |
||
39 | }); |
||
40 | |||
41 | $this->tester->expectException('yii\base\InvalidParamException', function() { |
||
42 | new ResetPasswordForm('notexistingtoken_1391882543'); |
||
43 | }); |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @inheritdoc |
||
48 | */ |
||
49 | public function testResetCorrectToken() |
||
54 | } |
||
55 | } |
||
56 |