PHP code example of joshhanley / livewire-dusk-testbench
1. Go to this page and download the library: Download joshhanley/livewire-dusk-testbench 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-testbench example snippets
/** @test */
public function it_can_count()
{
$this->browse(function (Browser $browser) {
Livewire::visit($browser, CounterComponent::class)
// Assertions here
;
});
}
/** @test */
public function it_can_count()
{
Livewire::visit(CounterComponent::class)
// Assertions here
;
}
class BrowserTestCase extends LivewireDuskTestbench\TestCase
{
//
}
public array $packageProviders = [
YourPackageServiceProvider::class,
];
public function viewsDirectory(): string
{
// Resolves to 'tests/Browser/views'
return __DIR__.'/views';
}
public $packageProviders = [];
public function viewsDirectory(): string
{
return '';
}
public static function tweakApplicationHook()
{
return function () {};
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.