Tutorials , code & Inspiration

Database testing with PHPUnit in laravel

PHPUnit is well integrated with Laravel 5 as it was with Laravel 4, so it is rather easy to set up the testing environment. A good method for testing would be to use the SQLite database and to set it up to reside in the memory, but you need to modify the config/database.php file, as follows:

    'default' => 'sqlite',
       'connections' => array(
        'sqlite' => array(
            'driver'   => 'sqlite',
            'database' => ':memory:',
            'prefix'   => '',

prevChapter 1 of 8


Get the best in web dev

Join dunebook.com and recieve best in web dev , once a week FREE

An email has been Sent to your Inbox ! Please Confirm your Subscription :)

Pin It on Pinterest