adrema/tests/Feature/Base/PageLayoutTest.php

33 lines
650 B
PHP
Raw Normal View History

2024-09-24 01:26:08 +02:00
<?php
2024-10-13 21:00:47 +02:00
namespace Tests\Feature\Base;
2024-09-24 01:26:08 +02:00
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Livewire\Component;
use Livewire\Livewire;
uses(DatabaseTransactions::class);
it('renders successfully', function () {
$this->login()->loginNami();
Livewire::test(DummyComponent::class)
->assertSee('Testcontent')
->assertSee(auth()->user()->lastname);
});
class DummyComponent extends Component
{
public function render(): string
{
return <<<'HTML'
<div>
<x-page::layout>
Testcontent
</x-page::layout>
</div>
HTML;
}
}