mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-02-11 08:51:57 +00:00
67 - Upgrading to Laravel 5.4
This commit is contained in:
@@ -6,10 +6,11 @@
|
|||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.6.4",
|
"php": ">=5.6.4",
|
||||||
"laravel/framework": "5.3.*",
|
"laravel/framework": "5.4.*",
|
||||||
"zondicons/blade-bridge": "^0.1.0",
|
"zondicons/blade-bridge": "^0.1.0",
|
||||||
"stripe/stripe-php": "^4.3",
|
"stripe/stripe-php": "^4.3",
|
||||||
"guzzlehttp/guzzle": "^6.2"
|
"guzzlehttp/guzzle": "^6.2",
|
||||||
|
"laravel/browser-kit-testing": "^1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fzaninotto/faker": "~1.4",
|
"fzaninotto/faker": "~1.4",
|
||||||
|
|||||||
1294
composer.lock
generated
1294
composer.lock
generated
File diff suppressed because it is too large
Load Diff
39
tests/BrowserKitTestCase.php
Normal file
39
tests/BrowserKitTestCase.php
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use App\Exceptions\Handler;
|
||||||
|
use Illuminate\Contracts\Debug\ExceptionHandler;
|
||||||
|
|
||||||
|
abstract class BrowserKitTestCase extends Laravel\BrowserKitTesting\TestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The base URL to use while testing the application.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $baseUrl = 'http://localhost';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the application.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Foundation\Application
|
||||||
|
*/
|
||||||
|
public function createApplication()
|
||||||
|
{
|
||||||
|
$app = require __DIR__.'/../bootstrap/app.php';
|
||||||
|
|
||||||
|
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
||||||
|
|
||||||
|
return $app;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function disableExceptionHandling()
|
||||||
|
{
|
||||||
|
$this->app->instance(ExceptionHandler::class, new class extends Handler {
|
||||||
|
public function __construct() {}
|
||||||
|
public function report(Exception $e) {}
|
||||||
|
public function render($request, Exception $e) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,7 +7,7 @@ use Illuminate\Foundation\Testing\WithoutMiddleware;
|
|||||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||||
|
|
||||||
class PurchaseTicketsTest extends TestCase
|
class PurchaseTicketsTest extends BrowserKitTestCase
|
||||||
{
|
{
|
||||||
use DatabaseMigrations;
|
use DatabaseMigrations;
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use Illuminate\Foundation\Testing\WithoutMiddleware;
|
|||||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||||
|
|
||||||
class ViewConcertListingTest extends TestCase
|
class ViewConcertListingTest extends BrowserKitTestCase
|
||||||
{
|
{
|
||||||
use DatabaseMigrations;
|
use DatabaseMigrations;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user