I have running project on localhost port 8000, and at first seek it opens home page ('/') perfecly but for some reasons
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class ExampleTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testBasicTest()
{
$response = $this->get('/');
$response->assertStatus(200);
}
}
code returns me 500 not 200.
Time: 1 second, Memory: 22.00 MB
There was 1 failure:
- Tests\Feature\ExampleTest::testBasicTest Expected status code 200 but received 500. Failed asserting that 200 is identical to 500.
Why from controller it opens page but test fails?
Aucun commentaire:
Enregistrer un commentaire