|
102 | 102 | * * `orm` - include only `haveRecord/grabRecord/seeRecord/dontSeeRecord` actions.
|
103 | 103 | * * `fixtures` - use fixtures inside tests with `haveFixtures/grabFixture/grabFixtures` actions.
|
104 | 104 | * * `email` - include email actions `seeEmailsIsSent/grabLastSentEmail/...`
|
| 105 | + * * `route` - include route actions `amOnRoute` |
105 | 106 | *
|
106 | 107 | * See [WebDriver module](https://codeception.com/docs/modules/WebDriver#Loading-Parts-from-other-Modules)
|
107 | 108 | * for general information on how to load parts of a framework module.
|
|
117 | 118 | * browser: firefox
|
118 | 119 | * - Yii2:
|
119 | 120 | * configFile: 'config/test.php'
|
120 |
| - * part: orm # allow to use AR methods |
| 121 | + * part: [orm, route] # allow to use AR methods and route method |
121 | 122 | * transaction: false # don't wrap test in transaction
|
122 | 123 | * cleanup: false # don't cleanup the fixtures
|
123 | 124 | * entryScript: index-test.php
|
@@ -422,7 +423,7 @@ protected function rollbackTransactions(): void
|
422 | 423 |
|
423 | 424 | public function _parts(): array
|
424 | 425 | {
|
425 |
| - return ['orm', 'init', 'fixtures', 'email']; |
| 426 | + return ['orm', 'init', 'fixtures', 'email','route']; |
426 | 427 | }
|
427 | 428 |
|
428 | 429 | /**
|
@@ -679,6 +680,7 @@ protected function findRecord(string $model, array $attributes = []): \yii\db\Ac
|
679 | 680 | *
|
680 | 681 | * @param string $route A route
|
681 | 682 | * @param array $params Additional route parameters
|
| 683 | + * @part route |
682 | 684 | */
|
683 | 685 | public function amOnRoute(string $route, array $params = []): void
|
684 | 686 | {
|
|
0 commit comments