webit/test-tools 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

webit/test-tools

最新稳定版本:0.1.0

Composer 安装命令:

composer require --dev webit/test-tools

包简介

Web-IT Test tools

README 文档

README

Unit / Behaviour test tools

Standalone Symfony Bundle Configuration testing

Create your AppKernel:

use Webit\Tests\Behaviour\Bundle\Kernel as BaseKernel;

class AppKernel extends BaseKernel
{
    public function registerBundles()
    {
        return array(
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new My\BrandNewBundle();
        ); // array of your Bundles
    }
}

Create your FeatureContext and register the Kernel:

use Webit\Tests\Behaviour\Bundle\BundleConfigurationContext;

class FeatureContext extends BundleConfigurationContext
{
    public function __construct()
    {
        parent::__construct(new AppKernel());
    }
}

Scenario example:

Feature: MyBrandNewBundle configuration feature
  In order to set up MyBrandNew library with Symfony Application
  As a developer
  I need Bundle Configuration / Extension
  
  Background:
    Given the configuration contains:
    """
    framework:
        secret: "my-secret-hash"
        
    my_brand_new: ~
    """
  
  Scenario: Basic configuration
    When I bootstrap the application
    Then there should be following services defined:
    """
    my_service_one, my_service_two, my_service_three
    """
    And there should be following aliases defined:
    | service                    | alias              |
    | my_service.default_service | my_service.service |
    And all given services should be reachable

Create as many scenarios as you need (for different configuration options). Feel free to add any other checks (steps) into your Context.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固