credy / phpbuiltinserver
为Codeception提供的PhpBuiltinServer扩展
v1.5.0
2019-09-19 09:04 UTC
Requires
- php: >=5.6.0
- codeception/codeception: ^3.0
Requires (Dev)
- phpunit/phpunit: 5.*
This package is auto-updated.
Last update: 2024-09-24 13:06:08 UTC
README
Codeception扩展,用于启动和停止PHP内置Web服务器以进行测试。
Codeception分支 | PhpBuiltinServer分支 | 状态 |
---|---|---|
Codeception 1.x | 1.1.x | ![]() |
Codeception 2.0 | 1.2.x | ![]() |
Codeception 2.1, 2.2 | 1.3.x | ![]() |
Codeception 2.3 | 1.4.x | ![]() |
Codeception 3.0, 4.0, 5.0 | master | ![]() |
最低要求
- Codeception 3.0
- PHP 5.6
安装
- 通过Composer安装Codeception
- 将
codeception/phpbuiltinserver: "*"
添加到您的composer.json
- 运行
composer install
- 将扩展包含到
codeception.yml
配置文件中
配置
通用示例
paths:
tests: .
log: _log
data: _data
helpers: _helpers
extensions:
enabled:
- Codeception\Extension\PhpBuiltinServer
config:
Codeception\Extension\PhpBuiltinServer:
hostname: localhost
port: 8000
autostart: true
documentRoot: tests/_data
startDelay: 1
phpIni: /etc/php5/apache2/php.ini
基于Symfony的项目示例
paths:
tests: .
log: _log
data: _data
helpers: _helpers
extensions:
enabled:
- Codeception\Extension\PhpBuiltinServer
config:
Codeception\Extension\PhpBuiltinServer:
hostname: localhost
port: 8000
autostart: true
documentRoot: ../web
router: ../web/app.php
directoryIndex: app.php
startDelay: 1
phpIni: /etc/php5/apache2/php.ini