Skip to content

Commit

Permalink
Fix usage of non string unresolvable values (nelmio#898)
Browse files Browse the repository at this point in the history
Closes nelmio#886
  • Loading branch information
theofidry authored Mar 17, 2018
1 parent 13e5732 commit b84b977
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static function createForCouldNotEvaluateExpression(ValueInterface $value
return new UnresolvableValueException(
sprintf(
'Could not evaluate the expression "%s".',
$value->getValue()
$value->__toString()
),
$code,
$previous
Expand All @@ -64,7 +64,7 @@ public static function createForCouldNotFindVariable(ValueInterface $value, int
return new UnresolvableValueException(
sprintf(
'Could not find a variable "%s".',
$value->getValue()
$value->__toString()
),
$code,
$previous
Expand Down Expand Up @@ -100,7 +100,7 @@ public static function createForNoFixtureOrObjectMatchingThePattern(ValueInterfa
return new UnresolvableValueException(
sprintf(
'Could not find a fixture or object ID matching the pattern "%s".',
$value->getValue()
$value->__toString()
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function testGetsTheVariableFromTheScope()

/**
* @expectedException \Nelmio\Alice\Throwable\Exception\Generator\Resolver\UnresolvableValueException
* @expectedExceptionMessage Could not find a variable "foo".
* @expectedExceptionMessage Could not find a variable "$foo".
*/
public function testThrowsAnExceptionIfTheVariableCannotBeFoundInTheScope()
{
Expand Down

0 comments on commit b84b977

Please sign in to comment.