PHPackages                             brightmarch/testing-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. brightmarch/testing-bundle

AbandonedSymfony-bundle[Testing &amp; Quality](/categories/testing)

brightmarch/testing-bundle
==========================

Symfony bundle to aid with functional and unit testing.

2.0.3(10y ago)21.6kMITPHPPHP &gt;=5.4.0

Since May 8Pushed 10y ago2 watchersCompare

[ Source](https://github.com/brightmarch/testing-bundle)[ Packagist](https://packagist.org/packages/brightmarch/testing-bundle)[ Docs](https://github.com/brightmarch/testing-bundle)[ RSS](/packages/brightmarch-testing-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (16)Used By (0)

BrightmarchTestingBundle
========================

[](#brightmarchtestingbundle)

This Symfony bundle makes it easy to write functional tests without the headache and without any additional libraries. The bundle allows you to easily create a client for executing requests against your application and access the Symfony Container to retrieve your services. Additionally, you can create authenticated clients to avoid the headache of having to navigate through a sign-in page to visit authenticated sections of your application.

Fixtures are also a cinch with this bundle. You no longer need to write individual classes to hydrate your database fixtures - simply define them in YAML and the bundle will take care of hydrating and persisting them for you!

Installation
------------

[](#installation)

Begin by updating your `composer.json` file with the library name.

```
{

    "require-dev": {
        "brightmarch/testing-bundle": "2.0.0"
    }

}
```

Install the bundle with Composer.

```
composer update --dev brightmarch/testing-bundle
```

Add the bundle class to your `app/AppKernel.php` file.

```
public function registerBundles()
{
    // ...

    if (in_array($this->getEnvironment(), array('dev', 'test'))) {
        // ...
        $bundles[] = new Brightmarch\TestingBundle\BrightmarchTestingBundle();
    }

    return $bundles;
}
```

Usage
-----

[](#usage)

Using the bundle is simple. It comes with a single class, `Brightmarch\TestingBundle\TestCase` that your functional test suites can extend.

### Sample Test Suite

[](#sample-test-suite)

```
