Level 53
@neeraj1005 do you tried to clear route cache? php artisan route:clear
Summer Sale! All accounts are 50% off this week.
When I run the command vendor/bin/phpunit This throw an error like this. It is just starting phase for run the phpunit testing. I did not understand the problem can anyone solve this problem?
$ vendor/bin/phpunit
PHPUnit 8.5.2 by Sebastian Bergmann and contributors.
F.. 3 / 3 (100%)
Time: 296 ms, Memory: 24.00 MB
There was 1 failure:
1) Tests\Feature\ExampleTest::testBasicTest
Expected status code 200 but received 404.
Failed asserting that false is true.
C:\xampp\htdocs\supportcrm\vendor\laravel\framework\src\Illuminate\Foundation\Testing\TestResponse.php:185
C:\xampp\htdocs\supportcrm\tests\Feature\ExampleTest.php:19
FAILURES!
Tests: 3, Assertions: 3, Failures: 1.
This is Feature/ExampleTest.php file code
<?php
namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ExampleTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testBasicTest()
{
$response = $this->get('/');
$response->assertStatus(200);
}
}
And this is my route
Route::get('/','HomepageController@index');
Please or to participate in this conversation.