Skip to content

Commit

Permalink
[#3234] Change r_print to var_export for diff generation of array sub…
Browse files Browse the repository at this point in the history
…sets
  • Loading branch information
1blankz7 authored and sebastianbergmann committed Sep 8, 2018
1 parent ce43508 commit 206d2fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Framework/Constraint/ArraySubset.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Framework/Constraint/ArraySubsetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
}

0 comments on commit 206d2fc

Please sign in to comment.