diff --git a/src/Framework/Constraint/ArraySubset.php b/src/Framework/Constraint/ArraySubset.php index 52493727b13..3135e516afe 100644 --- a/src/Framework/Constraint/ArraySubset.php +++ b/src/Framework/Constraint/ArraySubset.php @@ -83,8 +83,8 @@ public function evaluate($other, $description = '', $returnResult = false) $f = new ComparisonFailure( $patched, $other, - \print_r($patched, true), - \print_r($other, true) + \var_export($patched, true), + \var_export($other, true) ); $this->fail($other, $description, $f); diff --git a/tests/unit/Framework/Constraint/ArraySubsetTest.php b/tests/unit/Framework/Constraint/ArraySubsetTest.php index f48dd3ec19f..2d35b36743e 100644 --- a/tests/unit/Framework/Constraint/ArraySubsetTest.php +++ b/tests/unit/Framework/Constraint/ArraySubsetTest.php @@ -77,8 +77,8 @@ public function testEvaluateFailMessage() } catch (ExpectationFailedException $expectedException) { $comparisonFailure = $expectedException->getComparisonFailure(); $this->assertNotNull($comparisonFailure); - $this->assertContains('[foo] => bar', $comparisonFailure->getExpectedAsString()); - $this->assertContains('[baz] => bar', $comparisonFailure->getActualAsString()); + $this->assertContains("'foo' => 'bar'", $comparisonFailure->getExpectedAsString()); + $this->assertContains("'baz' => 'bar'", $comparisonFailure->getActualAsString()); } } }