定制 ciaranmcnulty/behat-localwebserverextension 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

ciaranmcnulty/behat-localwebserverextension

最新稳定版本:1.1.3

Composer 安装命令:

composer require ciaranmcnulty/behat-localwebserverextension

包简介

Extension for behat users who forget to start their webserver

README 文档

README

A trivial extension for people who forget to start their webserver

Build Status

Installation

Require in composer

composer require ciaranmcnulty/behat-localwebserverextension --dev

Usage

Add to your behat.yml:

default:
  extensions:
    Cjm\Behat\LocalWebserverExtension: ~

Run your suite, and your web examples should pass - the internal PHP webserver is started at suite start and exited at suite end.

Advanced Configuration

Available configuration options:

default:
  extensions:
    Cjm\Behat\LocalWebserverExtension:
        host : 192.168.1.1   # defaults to 'localhost'
        port : 80            # defaults to '8000'
        docroot: /wwroot     # defaults to '%paths.base%/web'
        router: router.php   # defaults to 'null'
        suites: [ web, ui ]  # defaults to (all suites)

If your behat config is elsewhere than in your root directory (for example app/behat.yml you need to customize the docroot to the right path. In our example it would be docroot: '%paths.base%/../web'

Usage with MinkExtension

When MinkExtension is used, default host and port will be read from Mink's base_url setting , but you can still override if required.

default:
  extensions:
    Behat\MinkExtension:
      base_url:  'http://dev.local:9001'
      sessions:
        default:
          goutte: ~
    Cjm\Behat\LocalWebserverExtension: ~

Limitations

To do:

  • Only turn webserver on for certain contexts
  • Support symfony app console
  • Support custom server startup / stop commands

统计信息

  • 总下载量: 27.17k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 15
  • 点击次数: 0
  • 依赖项目数: 9
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-20