Skip to content

Commit

Permalink
Fix resolve current with range references (#955)
Browse files Browse the repository at this point in the history
  • Loading branch information
goetas authored and theofidry committed Sep 27, 2018
1 parent c37dcd0 commit 9c730ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public function resolve(
$_scope = $scope;
try {
$_scope['current'] = $fixture->getValueForCurrent();

if ($_scope['current'] instanceof FixtureInterface) {
$_scope['current'] = $fixtureSet->getObjects()->get($_scope['current'])->getInstance();
}
} catch (NoValueForCurrentException $exception) {
// Continue
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Loader/LoaderIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ public function testLoadReferenceRange()
],
'userdetail_single_{@user1}' => [
'email' => '<email()>',
'user' => '<current()>',
'user' => '<($current)>',
],
],
];
Expand Down

0 comments on commit 9c730ed

Please sign in to comment.