PHP code example of dees040 / festing

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

    

dees040 / festing example snippets


Dees040\Festing\ServiceProvider::class,

'testing' => [
    'driver' => 'sqlite',
    'database' => database_path('testing.sqlite'),
    'prefix'   => '',
],


use Dees040\Festing\FestTheDatabase;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;

abstract class TestCase extends BaseTestCase
{
    use CreatesApplication, FestTheDatabase;


    /**
     * Boot the testing helper traits.
     *
     * @return array
     */
    protected function setUpTraits()
    {
        $uses = parent::setUpTraits();
    
        if (isset($uses[\Dees040\Festing\ShouldFest::class])) {
            $this->runFester();
        }
    
        return $uses;
    }



namespace Tests\Unit;

use Tests\TestCase;
use Dees040\Festing\ShouldFest;

class ExampleTest extends TestCase
{
    use ShouldFest;
    
    /**
     * A basic test example.
     *
     * @return void
     */
    public function testBasicTest()
    {
        $this->assertTrue(true);
    }
}
bash
php artisan vendor:publish --provider="Dees040\Festing\ServiceProvider" --tag="config"
xml
<env name="DB_CONNECTION" value="testing"/>