Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add @part route to amOnRoute method in Yii2 module #112

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Codeception/Module/Yii2.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
* * `orm` - include only `haveRecord/grabRecord/seeRecord/dontSeeRecord` actions.
* * `fixtures` - use fixtures inside tests with `haveFixtures/grabFixture/grabFixtures` actions.
* * `email` - include email actions `seeEmailsIsSent/grabLastSentEmail/...`
* * `route` - include route actions `amOnRoute`
*
* See [WebDriver module](https://codeception.com/docs/modules/WebDriver#Loading-Parts-from-other-Modules)
* for general information on how to load parts of a framework module.
Expand All @@ -117,7 +118,7 @@
* browser: firefox
* - Yii2:
* configFile: 'config/test.php'
* part: orm # allow to use AR methods
* part: orm, route # allow to use AR methods and route method
* transaction: false # don't wrap test in transaction
* cleanup: false # don't cleanup the fixtures
* entryScript: index-test.php
Expand Down Expand Up @@ -422,7 +423,7 @@ protected function rollbackTransactions(): void

public function _parts(): array
{
return ['orm', 'init', 'fixtures', 'email'];
return ['orm', 'init', 'fixtures', 'email','route'];
}

/**
Expand Down Expand Up @@ -679,6 +680,7 @@ protected function findRecord(string $model, array $attributes = []): \yii\db\Ac
*
* @param string $route A route
* @param array $params Additional route parameters
* @part route
*/
public function amOnRoute(string $route, array $params = []): void
{
Expand Down
Loading