PHP code example of astrotomic / pest-plugin-laravel-snapshots

1. Go to this page and download the library: Download astrotomic/pest-plugin-laravel-snapshots 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/ */

    

astrotomic / pest-plugin-laravel-snapshots example snippets


use Orchestra\Testbench\TestCase;
uses(TestCase::class);

// long
test('html response body matches with snapshot')
    ->get('/html')
    ->assertMatchesHtmlSnapshot();

// short
// https://github.com/pestphp/pest-plugin-laravel
use function Pest\Laravel\get;
get('/html')->assertMatchesHtmlSnapshot();