Is there a way to specify a related row of another fixture in fixture data file in Yii2/Codeception ActiveFixture? Consider this example of user/profile relation:
user.php:
return [
'user1' => [
'email' => 'user1@example.net',
]
];
profile.php:
use common\models\User;
return [
'profile1' => [
'user_id' => User::findOne(['email' => 'user1@example.net'])->id;
'name' => 'My Name',
]
];
The documentation states that "You may give an alias to a row so that later in your test, you may refer to the row via the alias." Is there a way to reference rows inside another fixture? For example, use something like $this->user('user1')->id in profile.php? I could not find any mention on how to do that. How do you create this kind of related fixtures?