PHPUNIT Test - Expected Status 200 But Received 500



PHP Snippet 1:

use Illuminate\Foundation\Testing\RefreshDatabase;

class ExampleTest extends TestCase
{
    use RefreshDatabase;

    public function testBasicTest()
    {
        $response = $this->get('/');

        $response->assertStatus(200);
    }
}

PHP Snippet 2:

namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
    
class ExampleTest extends TestCase
{
    /**
    * A basic test example.
    *
    * @return void
    */
    public function testBasicTest()
    {
        $this->assertTrue(true);
    }
}

PHP Snippet 3:

Route::get('home','BlogController@home')->name('home');

PHP Snippet 4:

$response = $this->get('home');