承接 moon/fakemiddleware 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

moon/fakemiddleware

最新稳定版本:1.1

Composer 安装命令:

composer require moon/fakemiddleware

包简介

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

README 文档

README

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

Installation

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

Usage

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

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;
}

统计信息

  • 总下载量: 26.15k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固