PHP code example of andrewgatenby / snapmigrations

1. Go to this page and download the library: Download andrewgatenby/snapmigrations 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/ */

    

andrewgatenby / snapmigrations example snippets




namespace Tests;

use AndrewGatenby\SnapMigrations\SnapMigrations;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;

abstract class MyAmazingTestCase extends BaseTestCase
{
    use SnapMigrations;
}



namespace Tests;

use AndrewGatenby\SnapMigrations\SnapMigrations;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;

abstract class MyAmazingTestCase extends BaseTestCase
{
    use SnapMigrations {
        setUp as setUpSnapMigrations;
    }
    
    public function setUp()
    {
        // run setUp for Snap Migrations, which also calls parent::setUp()
        $this->setUpSnapMigrations();
        // my regular setUp tasks for MyAmazingTestCase
    }
}