PHP code example of joshhanley / livewire-dusk-extension

1. Go to this page and download the library: Download joshhanley/livewire-dusk-extension library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

joshhanley / livewire-dusk-extension example snippets


use LivewireDuskExtension\LivewireDuskExtensionTestCase;

abstract class DuskTestCase extends LivewireDuskExtensionTestCase

'test-directories' => [
    'My\\Custom\\Namespace' => base_path('my/custom/namespace'),
],

public function testExample()
{
    $this->browse(function (Browser $browser) {
        $browser->livewire(SampleComponent::class)
            ->assertSee('Sample!');
    });
}
bash
php artisan vendor:publish --provider="LivewireDuskExtension\LivewireDuskExtensionServiceProvider"