PHP code example of gsferro / laravel-dusk-magic-test

1. Go to this page and download the library: Download gsferro/laravel-dusk-magic-test 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/ */

    

gsferro / laravel-dusk-magic-test example snippets


    public function testBasicExample()
    {
        $this->browse(function (Browser $browser) {
            $browser->visit('/')
                    ->magic();
        });
    }



use MagicTest\MagicTest\MagicTest;

class MyTest extends TestCase
{
    protected function setUp(): void
    {
        parent::setUp();
        
        MagicTest::disable();
    }
}