2017 © Pedro Peláez
 

library symfony-test-edition

Stripped down edition of Symfony3 for executing bundle tests

image

eo/symfony-test-edition

Stripped down edition of Symfony3 for executing bundle tests

  • Tuesday, April 26, 2016
  • by eymengunay
  • Repository
  • 1 Watchers
  • 1 Stars
  • 287 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Symfony Test Edition

Welcome to the Symfony Test Edition - a light-weight Symfony3 application that you can use as the skeleton for your bundle tests., (*1)

This document contains information on how to download, install, and start using Symfony Test Edition., (*2)

Install & Configure

Step 1: Add Symfony Test Edition to your project using composer

# composer.json
{
    "require-dev": {
        "eo/symfony-test": "~3.0"
    }
}

Now tell composer to download the added package by running the command:, (*3)

$ php composer.phar update eo/symfony-test

Composer will install the package to your project's vendor/eo directory., (*4)

Step 2: Configure PHPUnit

Example phpunit.xml configuration:, (*5)



<phpunit backupGlobals="false"
         backupStaticAttributes="false"
         colors="true"
         convertErrorsToExceptions="true"
         convertNoticesToExceptions="true"
         convertWarningsToExceptions="true"
         processIsolation="false"
         stopOnFailure="false"
         syntaxCheck="false"
         bootstrap="Tests/bootstrap.php"
>
    <testsuites>
        <testsuite name="Your Bundle Test Suite">
            <directory>./Tests/</directory>
        </testsuite>
    </testsuites>

    <php>
        <server name="KERNEL_DIR" value="./vendor/eo/symfony-test-edition/app" />
    </php>
</phpunit>

Step 3: Bootstrap your tests (optional)

Now that you have properly installed Symfony Test Edition and configured PHPUnit, the next (optional) step is to create a bootstrap file for your custom configuration and bundles., (*6)

Add the following configuration to your config.yml file:, (*7)

load(__DIR__ . "/config.yml");
}

function registerBundles() {
    // If you need to register additional
    // bundles add them here as you would normally do
    // with the Symfony Standard Edition
    // This function is optional.

    // A simple example:
    return array(
        new Acme\DemoBundle\AcmeDemoBundle(),
    );
}
?>

Usage

You are now ready for executing your tests. For a real-world example you can have a look at PassbookBundle., (*8)

License

This bundle is under the MIT license. See the complete license in:, (*9)

./LICENSE

Reporting an issue or a feature request

Issues and feature requests related to this bundle are tracked in the Github issue tracker., (*10)

The Versions

26/04 2016

dev-master

9999999-dev

Stripped down edition of Symfony3 for executing bundle tests

  Sources   Download

MIT

The Requires