Squashed commit of the following:
commit 70d23bbd8fbdbeb3b6554e42ac4283396372f39d Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Feb 3 21:40:55 2017 +0000 Updade to Laravel 5.4
This commit is contained in:
parent
9ee898ba7c
commit
0a07811311
33 changed files with 581 additions and 606 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -1,12 +1,12 @@
|
||||||
/vendor
|
|
||||||
/node_modules
|
/node_modules
|
||||||
/bower_components
|
|
||||||
/public/storage
|
/public/storage
|
||||||
|
/public/hot
|
||||||
|
/storage/*.key
|
||||||
|
/vendor
|
||||||
|
/.idea
|
||||||
Homestead.yaml
|
Homestead.yaml
|
||||||
Homestead.json
|
Homestead.json
|
||||||
.env
|
.env
|
||||||
/.sass-cache
|
|
||||||
/public/files
|
/public/files
|
||||||
/public/keybase.txt
|
/public/keybase.txt
|
||||||
/coverage
|
/coverage
|
||||||
/storage/*.key
|
|
||||||
|
|
|
@ -15,6 +15,9 @@ class Kernel extends HttpKernel
|
||||||
*/
|
*/
|
||||||
protected $middleware = [
|
protected $middleware = [
|
||||||
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
||||||
|
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||||
|
\App\Http\Middleware\TrimStrings::class,
|
||||||
|
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,6 +53,7 @@ class Kernel extends HttpKernel
|
||||||
protected $routeMiddleware = [
|
protected $routeMiddleware = [
|
||||||
'auth' => \App\Http\Middleware\Authenticate::class,
|
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||||
|
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||||
'myauth' => \App\Http\Middleware\MyAuthMiddleware::class,
|
'myauth' => \App\Http\Middleware\MyAuthMiddleware::class,
|
||||||
|
|
18
app/Http/Middleware/TrimStrings.php
Normal file
18
app/Http/Middleware/TrimStrings.php
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\Middleware\TrimStrings as BaseTrimmer;
|
||||||
|
|
||||||
|
class TrimStrings extends BaseTrimmer
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The names of the attributes that should not be trimmed.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $except = [
|
||||||
|
'password',
|
||||||
|
'password_confirmation',
|
||||||
|
];
|
||||||
|
}
|
|
@ -16,11 +16,6 @@ class BroadcastServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
Broadcast::routes();
|
Broadcast::routes();
|
||||||
|
|
||||||
/*
|
require base_path('routes/channels.php');
|
||||||
* Authenticate the user's personal channel...
|
|
||||||
*/
|
|
||||||
Broadcast::channel('App.User.*', function ($user, $userId) {
|
|
||||||
return (int) $user->id === (int) $userId;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,10 +36,10 @@ class RouteServiceProvider extends ServiceProvider
|
||||||
*/
|
*/
|
||||||
public function map()
|
public function map()
|
||||||
{
|
{
|
||||||
$this->mapWebRoutes();
|
|
||||||
|
|
||||||
$this->mapApiRoutes();
|
$this->mapApiRoutes();
|
||||||
|
|
||||||
|
$this->mapWebRoutes();
|
||||||
|
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,12 +52,9 @@ class RouteServiceProvider extends ServiceProvider
|
||||||
*/
|
*/
|
||||||
protected function mapWebRoutes()
|
protected function mapWebRoutes()
|
||||||
{
|
{
|
||||||
Route::group([
|
Route::middleware('web')
|
||||||
'middleware' => 'web',
|
->namespace($this->namespace)
|
||||||
'namespace' => $this->namespace,
|
->group(base_path('routes/web.php'));
|
||||||
], function ($router) {
|
|
||||||
require base_path('routes/web.php');
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,12 +66,9 @@ class RouteServiceProvider extends ServiceProvider
|
||||||
*/
|
*/
|
||||||
protected function mapApiRoutes()
|
protected function mapApiRoutes()
|
||||||
{
|
{
|
||||||
Route::group([
|
Route::prefix('api')
|
||||||
'middleware' => 'api',
|
->middleware('api')
|
||||||
'namespace' => $this->namespace,
|
->namespace($this->namespace)
|
||||||
'prefix' => 'api',
|
->group(base_path('routes/api.php'));
|
||||||
], function ($router) {
|
|
||||||
require base_path('routes/api.php');
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,20 +15,3 @@ define('LARAVEL_START', microtime(true));
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require __DIR__.'/../vendor/autoload.php';
|
require __DIR__.'/../vendor/autoload.php';
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Include The Compiled Class File
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| To dramatically increase your application's performance, you may use a
|
|
||||||
| compiled class file which contains all of the classes commonly used
|
|
||||||
| by a request. The Artisan "optimize" is used to create this file.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$compiledPath = __DIR__.'/cache/compiled.php';
|
|
||||||
|
|
||||||
if (file_exists($compiledPath)) {
|
|
||||||
require $compiledPath;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"name": "jonnybarnes/jonnybarnes.uk",
|
"name": "jonnybarnes/jonnybarnes.uk",
|
||||||
"description": "The code for jonnybanres.uk, based on Laravel 5.3",
|
"description": "The code for jonnybanres.uk, based on Laravel 5.4",
|
||||||
"keywords": ["framework", "laravel", "indieweb"],
|
"keywords": ["framework", "laravel", "indieweb"],
|
||||||
"license": "CC0-1.0",
|
"license": "CC0-1.0",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"ext-intl": "*",
|
"ext-intl": "*",
|
||||||
"php": ">=7.0.0",
|
"php": ">=7.0.0",
|
||||||
"laravel/framework": "5.3.*",
|
"laravel/framework": "5.4.*",
|
||||||
"jonnybarnes/indieweb": "dev-master",
|
"jonnybarnes/indieweb": "dev-master",
|
||||||
"jonnybarnes/webmentions-parser": "0.4.*",
|
"jonnybarnes/webmentions-parser": "0.4.*",
|
||||||
"guzzlehttp/guzzle": "~6.0",
|
"guzzlehttp/guzzle": "~6.0",
|
||||||
|
@ -23,14 +23,16 @@
|
||||||
"phaza/laravel-postgis": "~3.1",
|
"phaza/laravel-postgis": "~3.1",
|
||||||
"lcobucci/jwt": "^3.1",
|
"lcobucci/jwt": "^3.1",
|
||||||
"sensiolabs/security-checker": "^4.0",
|
"sensiolabs/security-checker": "^4.0",
|
||||||
"laravel/scout": "^1.1",
|
"laravel/scout": "^3.0",
|
||||||
"pmatseykanets/laravel-scout-postgres": "^0.2.0",
|
"pmatseykanets/laravel-scout-postgres": "^0.5.0",
|
||||||
"jonnybarnes/emoji-a11y": "^0.1.1"
|
"jonnybarnes/emoji-a11y": "^0.1.1",
|
||||||
|
"laravel/tinker": "^1.0",
|
||||||
|
"laravel/browser-kit-testing": "^1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fzaninotto/faker": "~1.4",
|
"fzaninotto/faker": "~1.4",
|
||||||
"mockery/mockery": "0.9.*",
|
"mockery/mockery": "0.9.*",
|
||||||
"phpunit/phpunit": "~5.0",
|
"phpunit/phpunit": "~5.7",
|
||||||
"symfony/css-selector": "3.1.*",
|
"symfony/css-selector": "3.1.*",
|
||||||
"symfony/dom-crawler": "3.1.*",
|
"symfony/dom-crawler": "3.1.*",
|
||||||
"barryvdh/laravel-debugbar": "~2.0",
|
"barryvdh/laravel-debugbar": "~2.0",
|
||||||
|
@ -46,12 +48,13 @@
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
"tests/TestCase.php"
|
"tests/TestCase.php",
|
||||||
|
"tests/BrowserKitTest.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"post-root-package-install": [
|
"post-root-package-install": [
|
||||||
"php -r \"copy('.env.example', '.env');\""
|
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||||
],
|
],
|
||||||
"post-create-project-cmd": [
|
"post-create-project-cmd": [
|
||||||
"php artisan key:generate"
|
"php artisan key:generate"
|
||||||
|
@ -66,6 +69,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"preferred-install": "dist"
|
"preferred-install": "dist",
|
||||||
|
"sort-packages": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
854
composer.lock
generated
854
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -213,6 +213,11 @@ return [
|
||||||
*/
|
*/
|
||||||
ScoutEngines\Postgres\PostgresEngineServiceProvider::class,
|
ScoutEngines\Postgres\PostgresEngineServiceProvider::class,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Laravel Tinker
|
||||||
|
*/
|
||||||
|
Laravel\Tinker\TinkerServiceProvider::class,
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -32,8 +32,8 @@ return [
|
||||||
|
|
||||||
'pusher' => [
|
'pusher' => [
|
||||||
'driver' => 'pusher',
|
'driver' => 'pusher',
|
||||||
'key' => env('PUSHER_KEY'),
|
'key' => env('PUSHER_APP_KEY'),
|
||||||
'secret' => env('PUSHER_SECRET'),
|
'secret' => env('PUSHER_APP_SECRET'),
|
||||||
'app_id' => env('PUSHER_APP_ID'),
|
'app_id' => env('PUSHER_APP_ID'),
|
||||||
'options' => [
|
'options' => [
|
||||||
//
|
//
|
||||||
|
|
|
@ -46,7 +46,7 @@ return [
|
||||||
|
|
||||||
'file' => [
|
'file' => [
|
||||||
'driver' => 'file',
|
'driver' => 'file',
|
||||||
'path' => storage_path('framework/cache'),
|
'path' => storage_path('framework/cache/data'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'memcached' => [
|
'memcached' => [
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Additional Compiled Classes
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Here you may specify additional classes to include in the compiled file
|
|
||||||
| generated by the `artisan optimize` command. These should be classes
|
|
||||||
| that are included on basically every request into the application.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'files' => [
|
|
||||||
//
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Compiled File Providers
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Here you may list service providers which define a "compiles" function
|
|
||||||
| that returns additional files that should be compiled, providing an
|
|
||||||
| easy way to get common files from any packages you are utilizing.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'providers' => [
|
|
||||||
//
|
|
||||||
],
|
|
||||||
|
|
||||||
];
|
|
|
@ -2,19 +2,6 @@
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| PDO Fetch Style
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| By default, database results will be returned as instances of the PHP
|
|
||||||
| stdClass object; however, you may desire to retrieve records in an
|
|
||||||
| array format for simplicity. Here you can tweak the fetch style.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'fetch' => PDO::FETCH_CLASS,
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Default Database Connection Name
|
| Default Database Connection Name
|
||||||
|
|
|
@ -11,8 +11,6 @@ return [
|
||||||
| by the framework. A "local" driver, as well as a variety of cloud
|
| by the framework. A "local" driver, as well as a variety of cloud
|
||||||
| based drivers are available for your choosing. Just store away!
|
| based drivers are available for your choosing. Just store away!
|
||||||
|
|
|
|
||||||
| Supported: "local", "ftp", "s3", "rackspace"
|
|
||||||
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'default' => 'local',
|
'default' => 'local',
|
||||||
|
@ -39,6 +37,8 @@ return [
|
||||||
| may even configure multiple disks of the same driver. Defaults have
|
| may even configure multiple disks of the same driver. Defaults have
|
||||||
| been setup for each driver as an example of the required options.
|
| been setup for each driver as an example of the required options.
|
||||||
|
|
|
|
||||||
|
| Supported Drivers: "local", "ftp", "s3", "rackspace"
|
||||||
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'disks' => [
|
'disks' => [
|
||||||
|
@ -51,12 +51,13 @@ return [
|
||||||
'public' => [
|
'public' => [
|
||||||
'driver' => 'local',
|
'driver' => 'local',
|
||||||
'root' => storage_path('app/public'),
|
'root' => storage_path('app/public'),
|
||||||
|
'url' => env('APP_URL').'/storage',
|
||||||
'visibility' => 'public',
|
'visibility' => 'public',
|
||||||
],
|
],
|
||||||
|
|
||||||
's3' => [
|
's3' => [
|
||||||
'driver' => 's3',
|
'driver' => 's3',
|
||||||
'key' => env('AWS_S3_KEY'),
|
'key' => env('AWS_S3_KEY'),
|
||||||
'secret' => env('AWS_S3_SECRET'),
|
'secret' => env('AWS_S3_SECRET'),
|
||||||
'region' => env('AWS_S3_REGION'),
|
'region' => env('AWS_S3_REGION'),
|
||||||
'bucket' => env('AWS_S3_BUCKET'),
|
'bucket' => env('AWS_S3_BUCKET'),
|
||||||
|
|
|
@ -11,8 +11,8 @@ return [
|
||||||
| sending of e-mail. You may specify which one you're using throughout
|
| sending of e-mail. You may specify which one you're using throughout
|
||||||
| your application here. By default, Laravel is setup for SMTP mail.
|
| your application here. By default, Laravel is setup for SMTP mail.
|
||||||
|
|
|
|
||||||
| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill",
|
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses"
|
||||||
| "ses", "sparkpost", "log"
|
| "sparkpost", "log", "array"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -55,8 +55,8 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'from' => [
|
'from' => [
|
||||||
'address' => 'hello@example.com',
|
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||||
'name' => 'Example',
|
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -85,17 +85,6 @@ return [
|
||||||
|
|
||||||
'username' => env('MAIL_USERNAME'),
|
'username' => env('MAIL_USERNAME'),
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| SMTP Server Password
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Here you may set the password required by your SMTP server to send out
|
|
||||||
| messages from your application. This will be given to the server on
|
|
||||||
| connection so that the application will be able to send messages.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'password' => env('MAIL_PASSWORD'),
|
'password' => env('MAIL_PASSWORD'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -111,4 +100,22 @@ return [
|
||||||
|
|
||||||
'sendmail' => '/usr/sbin/sendmail -bs',
|
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Markdown Mail Settings
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If you are using Markdown based email rendering, you may configure your
|
||||||
|
| theme and component paths here, allowing you to customize the design
|
||||||
|
| of the emails. Or, you may simply stick with the Laravel defaults!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'markdown' => [
|
||||||
|
'theme' => 'default',
|
||||||
|
'paths' => [
|
||||||
|
resource_path('views/vendor/mail'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -7,7 +7,7 @@ return [
|
||||||
| Default Queue Driver
|
| Default Queue Driver
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| The Laravel queue API supports a variety of back-ends via an unified
|
| Laravel's queue API supports an assortment of back-ends via a single
|
||||||
| API, giving you convenient access to each back-end using the same
|
| API, giving you convenient access to each back-end using the same
|
||||||
| syntax for each one. Here you may set the default queue driver.
|
| syntax for each one. Here you may set the default queue driver.
|
||||||
|
|
|
|
||||||
|
|
|
@ -85,6 +85,19 @@ return [
|
||||||
|
|
||||||
'table' => 'sessions',
|
'table' => 'sessions',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cache Store
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "apc" or "memcached" session drivers, you may specify a
|
||||||
|
| cache store that should be used for these sessions. This value must
|
||||||
|
| correspond with one of the application's configured cache stores.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'store' => null,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Session Sweeping Lottery
|
| Session Sweeping Lottery
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* Laravel - A PHP Framework For Web Artisans
|
* Laravel - A PHP Framework For Web Artisans
|
||||||
*
|
*
|
||||||
* @package Laravel
|
* @package Laravel
|
||||||
* @author Taylor Otwell <taylorotwell@gmail.com>
|
* @author Taylor Otwell <taylor@laravel.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -13,6 +13,6 @@ use Illuminate\Http\Request;
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Route::get('/user', function (Request $request) {
|
Route::middleware('auth:api')->get('/user', function (Request $request) {
|
||||||
return $request->user();
|
return $request->user();
|
||||||
})->middleware('auth:api');
|
});
|
||||||
|
|
16
routes/channels.php
Normal file
16
routes/channels.php
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Broadcast Channels
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may register all of the event broadcasting channels that your
|
||||||
|
| application supports. The given channel authorization callbacks are
|
||||||
|
| used to check if an authenticated user can listen to the channel.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
Broadcast::channel('App.User.{id}', function ($user, $id) {
|
||||||
|
return (int) $user->id === (int) $id;
|
||||||
|
});
|
|
@ -5,9 +5,9 @@
|
||||||
| Web Routes
|
| Web Routes
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This file is where you may define all of the routes that are handled
|
| Here is where you can register web routes for your application. These
|
||||||
| by your application. Just tell Laravel the URIs it should respond
|
| routes are loaded by the RouteServiceProvider within a group which
|
||||||
| to using a Closure or controller method. Build something great!
|
| contains the "web" middleware group. Now create something great!
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
namespace App\Tests;
|
namespace App\Tests;
|
||||||
|
|
||||||
use TestCase;
|
use BrowserKitTest;
|
||||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
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 ArticlesTest extends TestCase
|
class ArticlesTest extends BrowserKitTest
|
||||||
{
|
{
|
||||||
protected $appurl;
|
protected $appurl;
|
||||||
|
|
||||||
|
|
28
tests/BrowserKitTest.php
Normal file
28
tests/BrowserKitTest.php
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Contracts\Console\Kernel;
|
||||||
|
use Laravel\BrowserKitTesting\TestCase as BaseTestCase;
|
||||||
|
|
||||||
|
abstract class BrowserKitTest extends BaseTestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 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(Kernel::class)->bootstrap();
|
||||||
|
|
||||||
|
return $app;
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
namespace App\Tests;
|
namespace App\Tests;
|
||||||
|
|
||||||
use TestCase;
|
use BrowserKitTest;
|
||||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
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 ContactsTest extends TestCase
|
class ContactsTest extends BrowserKitTest
|
||||||
{
|
{
|
||||||
protected $appurl;
|
protected $appurl;
|
||||||
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
|
||||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
|
||||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
||||||
|
|
||||||
class ExampleTest extends TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* A basic functional test example.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function testBasicExample()
|
|
||||||
{
|
|
||||||
$this->visit(config('app.url') . '/')
|
|
||||||
->see('Jonny Barnes');
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
namespace App\Tests;
|
namespace App\Tests;
|
||||||
|
|
||||||
use TestCase;
|
use BrowserKitTest;
|
||||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
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 IndieAuthTest extends TestCase
|
class IndieAuthTest extends BrowserKitTest
|
||||||
{
|
{
|
||||||
protected $appurl;
|
protected $appurl;
|
||||||
|
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
|
|
||||||
namespace App\Tests;
|
namespace App\Tests;
|
||||||
|
|
||||||
use TestCase;
|
use BrowserKitTest;
|
||||||
use Lcobucci\JWT\Builder;
|
use Lcobucci\JWT\Builder;
|
||||||
use Lcobucci\JWT\Signer\Hmac\Sha256;
|
use Lcobucci\JWT\Signer\Hmac\Sha256;
|
||||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
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 MicropubClientTest extends TestCase
|
class MicropubClientTest extends BrowserKitTest
|
||||||
{
|
{
|
||||||
protected $appurl;
|
protected $appurl;
|
||||||
|
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
|
|
||||||
namespace App\Tests;
|
namespace App\Tests;
|
||||||
|
|
||||||
use TestCase;
|
use BrowserKitTest;
|
||||||
use Lcobucci\JWT\Builder;
|
use Lcobucci\JWT\Builder;
|
||||||
use Lcobucci\JWT\Signer\Hmac\Sha256;
|
use Lcobucci\JWT\Signer\Hmac\Sha256;
|
||||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
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 MicropubTest extends TestCase
|
class MicropubTest extends BrowserKitTest
|
||||||
{
|
{
|
||||||
use DatabaseTransactions;
|
use DatabaseTransactions;
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
namespace App\Tests;
|
namespace App\Tests;
|
||||||
|
|
||||||
use TestCase;
|
use BrowserKitTest;
|
||||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
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 NotesAdminTest extends TestCase
|
class NotesAdminTest extends BrowserKitTest
|
||||||
{
|
{
|
||||||
use DatabaseTransactions;
|
use DatabaseTransactions;
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
namespace App\Tests;
|
namespace App\Tests;
|
||||||
|
|
||||||
use Cache;
|
use Cache;
|
||||||
use TestCase;
|
use BrowserKitTest;
|
||||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
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 NotesTest extends TestCase
|
class NotesTest extends BrowserKitTest
|
||||||
{
|
{
|
||||||
protected $appurl;
|
protected $appurl;
|
||||||
protected $notesController;
|
protected $notesController;
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
namespace App\Tests;
|
namespace App\Tests;
|
||||||
|
|
||||||
use TestCase;
|
use BrowserKitTest;
|
||||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
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 PlacesTest extends TestCase
|
class PlacesTest extends BrowserKitTest
|
||||||
{
|
{
|
||||||
protected $appurl;
|
protected $appurl;
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
namespace App\Tests;
|
namespace App\Tests;
|
||||||
|
|
||||||
use TestCase;
|
use BrowserKitTest;
|
||||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
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 TokenServiceTest extends TestCase
|
class TokenServiceTest extends BrowserKitTest
|
||||||
{
|
{
|
||||||
protected $appurl;
|
protected $appurl;
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
namespace App\Tests;
|
namespace App\Tests;
|
||||||
|
|
||||||
use TestCase;
|
use BrowserKitTest;
|
||||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
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 WebMentionsTest extends TestCase
|
class WebMentionsTest extends BrowserKitTest
|
||||||
{
|
{
|
||||||
protected $appurl;
|
protected $appurl;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue