You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an expectation fails a count check, Mockery converts argument matchers into strings in order to display the expectation in the assertion failure message. When this is done to the Subset matcher when using a nested subset of arrays, casting to a string causes an "Array to string conversion" error
public function testSubsetError()
{
$expected = [
"foo" => [
"bar" => "baz"
]
];
$mock = \Mockery::mock(\Exception::class);
$mock->shouldReceive("getMessage")->with(\Mockery::subset($expected))->once();
}
Results in :
There was 1 error:
1) tests\ExampleTest::testSubsetError()
Array to string conversion
/project/path/mockery/library/Mockery/Matcher/Subset.php:87
The text was updated successfully, but these errors were encountered:
If an expectation fails a count check, Mockery converts argument matchers into strings in order to display the expectation in the assertion failure message. When this is done to the
Subset
matcher when using a nested subset of arrays, casting to a string causes an "Array to string conversion" errorResults in :
The text was updated successfully, but these errors were encountered: