I have a new installation of laravel 5.4
I tried changing the default test to see the failed test.
Tests /ExampleTest.php
class ExampleTest extends TestCase
{
public function testBasicTest()
{
$response = $this->get('/ooops');
$response->assertStatus(200);
}
}
I expected to see a more detailed error, for example, no route has been found or definedetc., but instead just this error saying
Time: 1.13 seconds, Memory: 8.00MB
There was 1 failure:
1) Tests\Feature\ExampleTest::testBasicTest
Expected status code 200 but received 404.
Failed asserting that false is true.
/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php:51
/var/www/tests/Feature/ExampleTest.php:21
It is really difficult to make TDD without a significant error (yes, I know that 404 is enough in this case, but most of the time it is not).
Is there a way to enable stacktrace in the same way as the one displayed in the browser? Or at least closer to it so that I know that I have to take the next step.
Thanks in advance.
source
share