-
Notifications
You must be signed in to change notification settings - Fork 0
Testing
Sven edited this page Jan 27, 2017
·
1 revision
Helps you to get the full client response for failed asserts. Use like this:
$this->assertEquals('foo', $crawler->filer('html')->text(), AssertHelper::saveResponseForFailedAssert($client));
If assert failed, you will get:
There was 1 failure:
1) Tests\Foo\Bar::yourTest()
Get your full response body here: /bundles/pmtool/testing/Tests_Foo_Bar-_2017-01-27_10-28-40.html
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'foo'
+'bar'
This will generate output files for every assert. To clean up, you should use this as part of your phpunit call:
php bin/console pm:tool:symfony --action=testing_clear