Well depending on how you write your test name you can use the options on PHPUnit cli. You can read more about them here.
--testdox-html Write agile documentation in HTML format
to file.
--testdox-text Write agile documentation in
Text format to file.
When you run your tests, instead of just running:
phpunit
try:
phpunit --testdox-html documentation.html
A little more detailed description:
PHPUnit's TestDox functionality looks at a test class and all the test
method names and converts them from camel case PHP names to sentences:
testBalanceIsInitiallyZero() becomes "Balance is initially zero". If
there are several test methods whose names only differ in a suffix of
one or more digits, such as testBalanceCannotBecomeNegative() and
testBalanceCannotBecomeNegative2(), the sentence "Balance cannot
become negative" will appear only once, assuming that all of these
tests succeed.
The output will look as follows:
phpunit --testdox BankAccountTest
PHPUnit 6.1.0 by Sebastian Bergmann and contributors.
BankAccount
[x] Balance is initially zero
[x] Balance cannot become negative
Update
As far as logging all requests, the only thing that comes to mind is to extend test case. I tried it out myself in a simple form and it seemed to work:
abstract class TestCase extends Illuminate\Foundation\Testing\TestCase
{
public function get($uri, array $headers = [])
{
parent::get($uri, $headers);
$txt = "GET REQUEST: ".$uri." HEADERS: ".json_encode($headers)."\n";
file_put_contents('logs.txt', $txt.PHP_EOL , FILE_APPEND | LOCK_EX);
}
}