<?php

namespace Tests\Feature\Base;

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;
    }
}
