Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function testCreateRole() |
||
19 | { |
||
20 | $model = new AuthItemModel(); |
||
21 | $model->type = Item::TYPE_ROLE; |
||
22 | $model->name = 'admin'; |
||
23 | $model->description = 'admin role'; |
||
24 | |||
25 | $this->assertTrue($model->save()); |
||
26 | $this->assertInstanceOf(Role::class, Yii::$app->authManager->getRole('admin')); |
||
27 | |||
28 | return Yii::$app->authManager->getRole('admin'); |
||
29 | } |
||
30 | |||
41 |