TestCase::createApplication PHP Method

createApplication() public method

Creates the application.
public createApplication ( ) : Illuminate\Foundation\Application
return Illuminate\Foundation\Application
    public function createApplication()
    {
        $app = (require __DIR__ . '/../bootstrap/app.php');
        $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
        $this->coverPath = $app->basePath() . '/public/img/covers';
        return $app;
    }

Usage Example

 public function setUp()
 {
     parent::createApplication();
     $this->modelMock = Mockery::mock('App\\Jugador');
     $this->requestMock = Mockery::mock('App\\Http\\Requests\\JugadorRequest');
     $this->imageMock = new UploadedFile('tests/imagen1.jpg', 'imagen1.jpg', 'image/jpeg', null, null, true);
 }
All Usage Examples Of TestCase::createApplication