alsbury/malice 问题修复 & 功能扩展

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

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

alsbury/malice

Composer 安装命令:

composer require alsbury/malice

包简介

Symfony bundle and Codeception fixtures module

README 文档

README

Codeception module for working with Alice/Faker fixtures in conjunction with AliceBundle.

This is an early prototype. Feedback is welcome.

Installation:

composer require alsbury/malice

Configure Codeception Test Suites

Add module to codeception test suite YAML file:

class_name: FunctionalTester
modules:
   enabled:
    - Symfony2:
        app_path: '../../../app'
        var_path: '../../../var'
        environment: 'test'
    - \Component\Registration\Tests\Helper\Functional
    - \Alsbury\Malice\Component\Codeception\Module\Malice:
        drop_create: true

Example test that loads fixtures defined in a bundle, specified by Doctrine annotations:

<?php

use Alsbury\Malice\Component\Annotation\Fixture;

/**
 * @Fixture("MyBundle:Foo.yml")
 * @Fixture("MyBundle:Bar.yml")
 * @Fixture("AnotherBundle:AnotherFoo.yml")
 */
class AccountCreatorTest extends \Codeception\TestCase\Test
{
    /**
     * @Fixture("MyBundle:MethodSpecificFoo.yml")
     */
    public function testNothing()
    {
        $this->assertEquals(true, true);
    }

    public function testSomeOtherNothing()
    {
        $this->assertEquals(true,true);
    }
}            

Setup fixtures per the hautelook/alice-bundle spec. Fixtures definition files Foo.yml are expected to be in the directory DataFixtures/ORM in the specific bundle directory. Each fixture needs to have its own annotation as noted in the sample above, containing the bundle name, followed by a colon, then the fixture yaml file MyBundle:Foo.yml. Fixture annotations for the class will apply to all methods in that class. Fixture annotations for a method will be added to the class fixtures for that specific test only.

Fixture environments are not currently supported.

Requirements

  • Symfony 2 or 3
  • Codeception 2.1+ with Symfony 2 module
  • hautelook/alice-bundle

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固