Created
July 10, 2020 02:35
-
-
Save agm1984/38d893e801ff257cc5da567a42e29fee to your computer and use it in GitHub Desktop.
Example of how to use the `DatabaseTransactions` Trait in Laravel.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests; | |
use Illuminate\Foundation\Testing\DatabaseTransactions; | |
use Illuminate\Foundation\Testing\TestCase as BaseTestCase; | |
abstract class TestCase extends BaseTestCase | |
{ | |
use CreatesApplication, DatabaseTransactions; | |
// your other stuff hence-forth | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This file exists alongside this sampler pack: https://gist.github.com/agm1984/7332c324165a020daa6ce6b91a437635