PHPackages                             deozza/philarmony-api-tester-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. deozza/philarmony-api-tester-bundle

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

deozza/philarmony-api-tester-bundle
===================================

A bundle to test Symfony API

3.2.0(6y ago)01131MITPHPPHP ^7.0

Since Jun 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/deozza/PhilarmonyApiTester)[ Packagist](https://packagist.org/packages/deozza/philarmony-api-tester-bundle)[ RSS](/packages/deozza-philarmony-api-tester-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (4)Versions (7)Used By (1)

PhilarmonyApiTester
===================

[](#philarmonyapitester)

![php](https://camo.githubusercontent.com/e91ffbd23f764553c7ba3dbef9800b30d71268ff4ac35327a2758e50ae6a9e5f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545372e322d626c75652e737667)![mysql](https://camo.githubusercontent.com/cd8e084467dfa8ab879212d4daecee1ab7be67d92ced111021d1fad8ce0e0933/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d7973716c2d253545352e372d626c75652e737667)![sqlite](https://camo.githubusercontent.com/72a55d5239e639ee4eca9b8882386d60b78b1681dc627b82966e6ac7ffdb747e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73716c6974652d332d626c75652e737667)[![symfony](https://camo.githubusercontent.com/1193dc75419874f2d03c378734d64ceab9bfb9e77e196f7040f7a9b7f67e81b3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73796d666f6e792d253545342e322d626c75652e737667)](https://symfony.com/doc/current/index.html#gsc.tab=0)[![Stable](https://camo.githubusercontent.com/23baee321ee8000000fd26d5e324daecbf63dadbf6c13192bffc4827428ff40d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737461626c652d312e312d627269676874677265656e2e737667)](https://github.com/deozza/Philarmony/tree/2.0.0)![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)

Table of contents
-----------------

[](#table-of-contents)

- [About](#about)
- [Installation](#installation)
- [Database preparation](#database-preparation)
- [How to use](#how-to-use)
- [Folder structure](#folder-structure)
- [Road map](#road-map)

About
-----

[](#about)

PhilarmonyApiTester is a bundle made to test your API. It ensures the quality and the sturdiness of your application via unit and scenario testing.

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

[](#installation)

You can install using composer, assuming it is already installed globally :

`composer require deozza/philarmony-api-tester-bundle`

Database preparation
--------------------

[](#database-preparation)

You need to create a database specifically for your tests. To ensure the tests are executed with the same environment and database, this one will be reset at the end of each test.

*We recommend the use of [doctrine/doctrine-fxtures-bundle](https://symfony.com/doc/master/bundles/DoctrineFixturesBundle/index.html) for the creation of a test database.*

The database you use for the tests could be in MySQL or SQLITE3.

- In the case you are using a MySQL database, you need to export it as a file, name it `demo.sql` { and store it as a file in the `/var/data/db_test` folder.
- In the case you are using a SQLITE3 database, you need to name it `demo.sqlite` { and store it as a file in the `/var/data/db_test` folder.

*For performance reasons, we recommend using a SQLITE3 database for your tests.*

How to use
----------

[](#how-to-use)

### Creating a ControllerTest

[](#creating-a-controllertest)

To tests a feature of your application, you need to create a folder in the `test` folder. Inside it, create a ControllerTest for each Controller related to that feature. The ControllerTest must match the following example:

```
