2017 © Pedro Peláez
 

library fakemiddleware

A small Laravel 5 package to disable a middleware in testing environment

image

moon/fakemiddleware

A small Laravel 5 package to disable a middleware in testing environment

  • Saturday, November 21, 2015
  • by moon0326
  • Repository
  • 1 Watchers
  • 4 Stars
  • 9,759 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 13 % Grown

The README.md

FakeMiddleware

, (*1)

Sometimes you want to disable a middleware/route middleware when testing a controller in Laravel 5. This package simplifies the process., (*2)

Installation

composer require --dev "moon/fakemiddleware": "1.1"

Usage

Open TestCase.php, which comes with L5 by default. Locate createApplication method and initialize FakeMiddleware., (*3)


use Moon\FakeMiddleware\FakeMiddleware; public function createApplication() { $app = require __DIR__.'/../bootstrap/app.php'; $app->make('Illuminate\Contracts\Console\Kernel')->bootstrap(); // This will remove ExternalOAuthVerifier and repalce auth middleware // with a fake middleware // function __construct(Application $app, $globalMiddlewares, $routeMiddlewares); new FakeMiddleware($app, ['App\Http\Middleware\ExternalOAuthVerifier'], ['auth']); return $app; }

The Versions

21/11 2015

dev-master

9999999-dev

A small Laravel 5 package to disable a middleware in testing environment

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Moon

28/04 2015

1.1

1.1.0.0

A small Laravel 5 package to disable a middleware in testing environment

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Moon

17/04 2015

0.1

0.1.0.0

A small Laravel 5 package to disable a middleware in testing environment

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Moon

17/04 2015

1.0

1.0.0.0

A small Laravel 5 package to disable a middleware in testing environment

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Moon

17/04 2015

0.0.1

0.0.1.0

A small Laravel 5 package to disable a middleware in testing environment

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Moon