foogile/elgg-phpunit
最新稳定版本:v0.0.3
Composer 安装命令:
composer require foogile/elgg-phpunit
包简介
PHPUnit setup to support integration testing with Elgg.
README 文档
README
Simple test configuration to support integration testing in Elgg using PHPUnit. Assumes the default directory structure for Elgg 1.9.
Installation
Install test configuration into your plugin using composer:
composer require foogile/elgg-phpunit
Usage
There are three default PHPUnit configurations that can be used to run all unit tests, all
integration tests, or all tests. Unit tests are placed in PLUGIN/tests/unit adn integration tests
are placed in PLUGIN/tests/integration. You can modify the Elgg configuration for the test
environment by creating a file named PLUGIN/tests/integration/settings.php.
Bootstrap
You can run custom init code by creating PLUGIN/tests/integration/bootstrap.php and
PLUGIN/tests/unit/bootstrap.php for integration and unit tests, respectively. Additionally,
PLUGIN/tests/bootstrap.php is loaded first for all cases.
Run unit tests
phpunit -c vendor/foogile/elgg-phpunit/phpunit.unit.xml
Run integration tests
phpunit -c vendor/foogile/elgg-phpunit/phpunit.integration.unit.xml
Run all tests
phpunit -c vendor/foogile/elgg-phpunit/phpunit.xml
Elgg installation helper
It is included a utility script to install an Elgg test environment. To
initialize the database, specify your database setup in
PLUGIN/tests/integration/settings.php and execute the following
from the root folder of your plugin:
php vendor/foogile/elgg-phpunit/install.php
统计信息
- 总下载量: 41
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPLv3
- 更新时间: 2015-04-13