PHPackages                             desarrolla2/test-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. desarrolla2/test-bundle

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

desarrolla2/test-bundle
=======================

This bundle provides test utilities for symfony2

2.1.1(3y ago)128.6k↓40%MITPHPPHP &gt;=8.0

Since May 31Pushed 3y ago1 watchersCompare

[ Source](https://github.com/desarrolla2/test-bundle)[ Packagist](https://packagist.org/packages/desarrolla2/test-bundle)[ RSS](/packages/desarrolla2-test-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (3)Versions (9)Used By (0)

TestBundle
==========

[](#testbundle)

This bundle allows you to perform functional tests quickly and easily with symfony.

Instalation
-----------

[](#instalation)

It is best installed it through [packagist](http://packagist.org/packages/desarrolla2/test-bundle)by including `desarrolla2/test-bundle` in your project composer.json require:

```
    "require": {
        // ...
        "desarrolla2/test-bundle":  "*"
    }
```

Usage
-----

[](#usage)

You just have to extend WebTestCase to start using the power of this bundle.

```
use Desarrolla2\TestBundle\Functional\WebTestCase

class ActivityTest extends WebTestCase
```

Examples
--------

[](#examples)

Here are some examples

1. make a request and check that the answer is a 200 in html

```
class ActivityTest extends WebTestCase
{
    public function testIndex()
    {
        $client = $this->getClient();
        $user = $this->logIn($client, 'daniel@devtia.com', $this->getBackendRoles());

        $this->requestAndAssertOkAndHtml(
            $client,
            'GET',
            '_app.activity.index'
        );
    }
}
```

2. complete a form, send it and check that a 301 returns. We always do redirect, when a form has passed the validation.

```
class ProfileTest extends WebTestCase
{
    public function testChangePassword()
    {
        $client = $this->getClient();
        $user = $this->logIn($client, 'daniel@devtia.com', $this->getBackendRoles());

        $this->requestGetAndPostAndAssertRedirect(
            $client,
            '_app.profile.password',
            [],
            'form',
            ['password' => ['first' => 'changeM3', 'second' => 'changeM3']]
        );
    }
}
```

As you can see, doing functional tests with this bundle is really easy. Go ahead and discover all the utilities that it brings

Reporting
---------

[](#reporting)

Each time a request is executed, the result of the response is stored in `desarrolla2.request.latest`. If you have phpunit configured to stop when it fails, here you will have in HTML format the response of the request that failed, which will allow you to find the error more quickly.

The bundle also brings the command `php bin / console phpunit: statistics --env = test` if you execute it it will show you:

1. A summary of the time taken to execute the tests, how many requests were made, average per request and number of routes not tested.

```
╰─$ php bin/console phpunit:statistics --env=test
+--------------------------+----------+------------+
| name                     | number   | percentage |
+--------------------------+----------+------------+
| Total execution time     | 1m23s    |            |
| Total requests           | 848      |            |
| Average time per request | 200ms    |            |
| Total routes             | 538      |            |
| Tested routes            | 470      | (87.36%)   |
| Pending routes           | 68       | (12.64%)   |
+--------------------------+----------+------------+
```

2. In the file `desarrolla2.routes.tested.txt` the detail of all the requests that were made, and how long it took to execute each one.

```
╰─$ cat var/logs/desarrolla2.routes.tested.txt
001. GET _api.activity.index ~0.152
   - /admin/api/activity/1 0.152
002. GET _api.contact.email ~0.168
   - /admin/api/contact/115148/email/daniel@devtia.com 0.168
003. GET _api.contact.phone ~0.128
   - /admin/api/contact/115148/phone/653965048 0.128
004. GET _api.service.index ~0.125
   - /admin/api/service/ 0.125
005. GET _api.sidebar.toggle ~0.091
   - /admin/api/sidebar/toggle 0.091
006. GET _app.activity.index ~2.533
[...]
```

3. In the file `desarrolla2.tested.pending.txt` the detail of the routes that have not been tested.

```
╰─$ cat var/logs/desarrolla2.routes.pending.txt
01. GET  _app.report.billing.payment
02. POST _app.transport.locator.view
03. GET  _app_admin_billing_invoice_batch
04. GET  _app_admin_contact_batch
05. GET  _app_admin_file_file_list
06. GET  _app_admin_participant_batch
07. GET  _public.contract.back
08. GET  _public.file.download
09. GET  _public.proposal.view
10. GET  _student.default.switch
[...]
```

4. In the file `desarrolla2.classes.profile.txt` the detail of the tests executed, and how long it took to execute each one

```
╰─$ cat var/logs/desarrolla2.classes.profile.txt
PublicBundle\Functional\Api\ProvinceTest: 241ms
 - testIndex: 241ms
AppBundle\Functional\FosUserTest: 438ms
 - testDefault: 438ms
AppBundle\Functional\Admin\MailTest: 499ms
 - testDefault: 499ms
AppBundle\Functional\Admin\ConfigurationTest: 712ms
 - testDefault: 712ms
AppBundle\Functional\DefaultTest: 729ms
 - testIndex: 729ms
AppBundle\Functional\Admin\LanguageTest: 759ms
 - testDefault: 759ms
AppBundle\Functional\File\FileTest: 775ms
 - testCategory: 775ms
PublicBundle\Functional\Api\HealthCheckTest: 779ms
 - testIndex: 156ms
 - testSwagger: 623ms
[...]
```

Contact
-------

[](#contact)

You can contact with me on [@desarrolla2](https://twitter.com/desarrolla2).

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~206 days

Recently: every ~154 days

Total

8

Last Release

1149d ago

Major Versions

1.0.2 → 2.0.02021-08-31

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/661529?v=4)[Daniel González](/maintainers/desarrolla2)[@desarrolla2](https://github.com/desarrolla2)

---

Top Contributors

[![desarrolla2](https://avatars.githubusercontent.com/u/661529?v=4)](https://github.com/desarrolla2 "desarrolla2 (84 commits)")

### Embed Badge

![Health badge](/badges/desarrolla2-test-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/desarrolla2-test-bundle/health.svg)](https://phpackages.com/packages/desarrolla2-test-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

9410.8k](/packages/ahmed-bhs-doctrine-doctor)[ecotone/symfony-bundle

Ecotone for Symfony — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Symfony Messenger, via PHP attributes.

11249.0k1](/packages/ecotone-symfony-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
