PHP Classes

File: tests/TestCase.php

Recommend this page to a friend!
  Classes of Moamen Eltouny   Laravel Executor   tests/TestCase.php   Download  
File: tests/TestCase.php
Role: Unit test script
Content type: text/plain
Description: Test class
Class: Laravel Executor
Execute commands, actions, jobs, and tasks
Author: By
Last change:
Date: 28 days ago
Size: 1,015 bytes
 

Contents

Class file image Download
<?php

namespace Pharaonic\Laravel\Executor\Tests;

use
Illuminate\Support\Facades\File;
use
Orchestra\Testbench\TestCase as OrchestraTestCase;
use
Pharaonic\Laravel\Executor\ExecutorServiceProvider;

class
TestCase extends OrchestraTestCase
{
    public function
setUp(): void
   
{
       
parent::setUp();

       
File::deleteDirectory(base_path('executors'));
    }

   
/**
     * add the package provider
     *
     * @param $app
     * @return array
     */
   
protected function getPackageProviders($app)
    {
        return [
ExecutorServiceProvider::class];
    }

   
/**
     * Define environment setup.
     *
     * @param \Illuminate\Foundation\Application $app
     * @return void
     */
   
protected function getEnvironmentSetUp($app)
    {
       
$app['config']->set('database.default', 'testbench');
       
$app['config']->set('database.connections.testbench', [
           
'driver' => 'sqlite',
           
'database' => ':memory:',
           
'prefix' => '',
        ]);
    }
}