定制 view-components/testing-helpers 二次开发

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

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

view-components/testing-helpers

Composer 安装命令:

composer require --dev view-components/testing-helpers

包简介

Helpers for view-components testing

README 文档

README

Build Status Release

This repository contains utilities for testing PHP packages of ViewComponents family.

1. Overview

1.1. Web Application

Package contains simple ready to use web-application based on Silex for components show-case and acceptance tests.

1.1.1. Installation

If your package needs this web-application, add post-install script to composer.json:

"scripts": {
        "post-install-cmd": [
            "ViewComponents\\TestingHelpers\\Installer\\Installer::postComposerInstall"
        ]
},

Post-install script will allow to configure web-application using command-line interface. If you use composer install command with -no-interaction option, default settings will be used.

1.1.2. Extending web-application

Packages that uses view-components/testing helpers can extend this application by adding it's controllers to WEBAPP_CONTROLLERS environmant variable.

Routing will be automatically generated using EasyRouting class.

1.1.3. Running web-application

Package contains serve command that is published to vendor/bin by composer.

Run it from your package folder to start web-server:

./vendor/bin/serve

On Windows OS it will also open web-application in browser after starting web-server.

1.2. Acceptance tests with PhpUnit

1.2.1. Starting & shutting down web-server during tests

Use vendor/view-components/testing-helpers/bootstrap/tests_bootstrap.php as bootstrap file if you need to implement acceptance tests using PhpUnit.

1.2.2. Abstract acceptance test.

Use ViewComponents\TestingHelpers\Test\Acceptance\AbstractAcceptanceTest as base class for your acceptance tests. It allows to perform http requests using GuzzleHttp package and contains helper methods for assertions.

1.3. Fixtures

Package provides set of fixtures for testing. It consists of data that is seeded to database during installation and same data in form of php array.

2. Installation

Testing Helpers can be installed via composer.

Important: Do not add view-components/testing-helpers to require section of composer.json. It must be added to require-dev section.

3. License

© 2016 Vitalii Stepanenko

Licensed under the MIT License.

Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固