2017 © Pedro Peláez
 

symfony-bundle test-framework-bundle

image

aureja/test-framework-bundle

  • Wednesday, July 19, 2017
  • by Tadcka
  • Repository
  • 1 Watchers
  • 2 Stars
  • 1,366 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 6 % Grown

The README.md

TestFrameworkBundle

Build Status, (*1)

This Bundle provides base classes for functional tests to assist in setting up test-databases., (*2)

Installation

Step 1. Install via Composer, (*3)

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

Step 2. Add to AppKernel.php, (*4)

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

Step 3. Basic usage, (*5)

<?php

use Aureja\Bundle\TestFrameworkBundle\Test\WebTestCase;

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

    // Tests
}

or, (*6)

<?php

use Aureja\Bundle\TestFrameworkBundle\Test\WebTestCase;

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

    // Tests
}

The Versions