используйте Tests\TestCase; // Исправьте Laravel TestCase
используйте Livewire\Livewire;
используйте Illuminate\Foundation\Testing\RefreshDatabase;
класс MyComponentTest расширяет TestCase
{
Код: Выделить всё
use RefreshDatabase;
/\*\* @test \*/
public function component_renders_properly()
{
Livewire::test('my-component')
-\>assertSee('Expected Text');
}
Подробнее здесь: https://stackoverflow.com/questions/798 ... t-failures
Мобильная версия