aureja / test-framework-bundle
Installs: 2 577
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.5
- doctrine/doctrine-bundle: >=1.3
- doctrine/orm: ~2.5
- symfony/browser-kit: >=2.7|~3.0
- symfony/doctrine-bridge: >=2.7|~3.0
- symfony/framework-bundle: >=2.7|~3.0
Requires (Dev)
- phpunit/phpunit: ~4.2
- symfony/symfony: >=2.7|~3.0
This package is auto-updated.
Last update: 2024-10-15 03:12:01 UTC
README
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 }