PHP code example of appeltaert / phpunit-assertion-message
1. Go to this page and download the library: Download appeltaert/phpunit-assertion-message library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
appeltaert / phpunit-assertion-message example snippets
$client->enableProfiler();
$response = $client->getResponse();
$this->assertTrue($response->isSuccessful(), "My message");
$client->enableProfiler();
$response = $client->getResponse();
$this->assertTrue($response->isSuccessful(),
new PAM("My message", [$response, $profiler->getCollector('request')]));
$response = $client->getResponse();
$this->assertTrue($response->isSuccessful(), new PAM("My message", [$response]));
$this->assertSame(
Response::HTTP_OK,
$client->getResponse()->getStatusCode(),
new PAM(sprintf('The %s public URL loads correctly.', $url), [$client->getProfile()->getCollector('request')])
);