2017 © Pedro Peláez
 

library malice

Symfony bundle and Codeception fixtures module

image

alsbury/malice

Symfony bundle and Codeception fixtures module

  • Thursday, July 14, 2016
  • by alsbury
  • Repository
  • 2 Watchers
  • 4 Stars
  • 725 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 14 Versions
  • 1 % Grown

The README.md

Malice Bundle

Codeception module for working with Alice/Faker fixtures in conjunction with AliceBundle., (*1)

This is an early prototype. Feedback is welcome., (*2)

Installation:

composer require alsbury/malice

Configure Codeception Test Suites

Add module to codeception test suite YAML file:, (*3)

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:, (*4)

<?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., (*5)

Fixture environments are not currently supported., (*6)

Requirements

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

The Versions

14/07 2016

dev-master

9999999-dev

Symfony bundle and Codeception fixtures module

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by David Alsbury

14/07 2016

0.2.1

0.2.1.0

Symfony bundle and Codeception fixtures module

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by David Alsbury

14/07 2016

dev-annotations

dev-annotations

Symfony bundle and Codeception fixtures module

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by David Alsbury

20/04 2016

0.1.10

0.1.10.0

Symfony bundle and Codeception fixtures module

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by David Alsbury

15/03 2016

0.1.9

0.1.9.0

Symfony bundle and Codeception fixtures module

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Alsbury

24/02 2016

0.1.8

0.1.8.0

Symfony bundle and Codeception fixtures module

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Alsbury

24/02 2016

0.1.7

0.1.7.0

Symfony bundle and Codeception fixtures module

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Alsbury

23/02 2016

0.1.6

0.1.6.0

Symfony bundle and Codeception fixtures module

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Alsbury

23/02 2016

0.1.5

0.1.5.0

Symfony bundle and Codeception fixtures module

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Alsbury

23/02 2016

0.1.4

0.1.4.0

Symfony bundle and Codeception fixtures module

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Alsbury

23/02 2016

0.1.3

0.1.3.0

Symfony bundle and Codeception fixtures module

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Alsbury

18/02 2016

0.1.2

0.1.2.0

Symfony bundle and Codeception fixtures module

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Alsbury

17/02 2016

0.1.1

0.1.1.0

Symfony bundle and Codeception fixtures module

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Alsbury

17/02 2016

0.1.0

0.1.0.0

Symfony bundle and Codeception fixtures module

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Alsbury