aureja/test-framework-bundle

Installs: 2 579

Dependents: 1

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 1

Open Issues: 0

Type:symfony-bundle

v0.2.0 2017-07-19 05:16 UTC

This package is auto-updated.

Last update: 2024-11-15 03:24:51 UTC


README

Build Status

This Bundle provides base classes for functional tests to assist in setting up test-databases.

Installation

Step 1. Install via Composer

composer require aureja/test-framework-bundle "dev-master"

Step 2. Add to AppKernel.php

class AppKernel extends Kernel
{
    /**
     * {@inheritdoc}
     */
    public function registerBundles()
    {
        $bundles = [
             // ...
             new Aureja\Bundle\TestFrameworkBundle\AurejaTestFrameworkBundle(),
             // ...
        ];
    }
}

Step 3. Basic usage

<?php

use Aureja\Bundle\TestFrameworkBundle\Test\WebTestCase;

/**
 * @dbIsolationPerTest
 */
class AcmeTest extends WebTestCase
{
    /**
     * {@inheritdoc}
     */
    protected function setUp()
    {
        $this->initClient();
    }

    // Tests
}

or

<?php

use Aureja\Bundle\TestFrameworkBundle\Test\WebTestCase;

/**
 * @dbIsolation
 */
class AcmeTest extends WebTestCase
{
    /**
     * {@inheritdoc}
     */
    protected function setUp()
    {
        $this->initClient();
    }

    // Tests
}