{"id":15159642,"url":"https://github.com/everycheck/test-api-rest-bundle","last_synced_at":"2025-09-30T10:30:41.051Z","repository":{"id":37546136,"uuid":"166214545","full_name":"everycheck/test-api-rest-bundle","owner":"everycheck","description":"TestApiRestBundle allows you to test your Symfony REST API deeply.","archived":true,"fork":false,"pushed_at":"2022-09-30T20:29:58.000Z","size":318,"stargazers_count":0,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-16T13:23:58.138Z","etag":null,"topics":["phpunit","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/everycheck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-17T11:28:11.000Z","updated_at":"2023-01-27T20:39:19.000Z","dependencies_parsed_at":"2022-08-18T03:10:14.062Z","dependency_job_id":null,"html_url":"https://github.com/everycheck/test-api-rest-bundle","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everycheck%2Ftest-api-rest-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everycheck%2Ftest-api-rest-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everycheck%2Ftest-api-rest-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everycheck%2Ftest-api-rest-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/everycheck","download_url":"https://codeload.github.com/everycheck/test-api-rest-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234724891,"owners_count":18877279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["phpunit","symfony","symfony-bundle"],"created_at":"2024-09-26T21:41:04.637Z","updated_at":"2025-09-30T10:30:40.732Z","avatar_url":"https://github.com/everycheck.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"TestApiRestBundle\n=================\n\n[![Build Status](https://travis-ci.com/everycheck/test-api-rest-bundle.svg?branch=master)](https://travis-ci.com/everycheck/test-api-rest-bundle)\n\n## About\n\n\nTestApiRestBundle allows you to test your Symfony REST API deeply. It checks the validity of your application and ensures it stays robust throughout time using PHPUnit and via unit, scenario and database testing.\n\n# Table of contents\n\n* [About](#about)\n* [Installation](#installation)\n* [Configuration](#configuration)\n* [Usages](#usages)\n* [Tests folder structure](#tests-folder-structure)\n* [Launching test](#launching-test)\n\n\n## Installation\n\n\nYou can install using composer, assuming it's already installed globally : \n\n```\ncomposer require --dev everycheck\\test-api-rest-bundle\n```\n\n## Configuration\n\nConfigure the relative paths of the directories containing the requests payloads that you would send in your tests and their expected responses. The paths are taken from `AcmeBundle\\tests\\AcmeBundle`.\n\n```yaml\ntest_api_rest:\n    directory:\n        payloads: path/to/payloads\n        responses: path/to/responses\n``` \n\nSo, here, the real path of the directories  are : \n\n`\nAcmeBundle\\tests\\AcmeBundle\\path\\to\\payloads\nAcmeBundle\\tests\\AcmeBundle\\path\\to\\responses\n`\n\n## Usages\n\n* [Basic usages](Resources/doc/SIMPLE_USAGE.md)\n\n### Advanced usages\n\n* [Test dynamic responses](Resources/doc/PATTERN_USAGE.md)\n* [Reuse response content](Resources/doc/REUSE_USAGE.md)\n* [Test email sending and their content](Resources/doc/EMAIL_USAGE.md)\n\n\n## Tests folder structure\n\nTo test one of your bundle, you just have to replicate the structure of that one and add some directories by the following structure\n\n    .\n    ├── tests                                       #   The basic Symfony test directory\n    │   ├── AcmeFooBundle                           #   Name of your bundle\n    │   │   ├── Controller                          \n    │   │   │   ├── FooControllerTest.php           #   Controller your want to test\n    │   │   │   └── ...                                    \n    │   │   │\n    │   │   ├── DataFixtures                        \n    │   │   │   └── ORM                             \n    │   │   │       ├─ LoadAcmeFooFixtures.php     #   Fixtures dedicated to one controller   \n    |   |   |       └── ...\n    │   │   │                                       \n    │   │   ├── Payloads                            \n    │   │   │   └── ...                             #   File posted to your API\n    │   │   │                                       \n    │   │   ├── Resources                           \n    │   │   │   └── config                          \n    │   │   │       ├── foo.yaml                    #   All the tests for a specific controller, set as a YAML file\n    │   │   │       └── ...                    \n    │   │   │   \n    │   │   └── Responses                           #   All the expected responses coming from the endpoints of your API when testing it\n    │   │       └── Expected\n    │   │           └── ...\n    │   └──\n    └──\n\n\n## Launching test \n\nHere are the commands to execute in order to test the bundle : \n\n```\ncomposer install\n\n./Tests/sampleProject/app/console d:d:d --force\n./Tests/sampleProject/app/console d:d:c\n./Tests/sampleProject/app/console d:s:c\n./Tests/sampleProject/app/console s:start --docroot=./Tests/sampleProject/public\n\nphp ./Tests/sampleProject/tests/DemoBundle/DataFixtures/LoadDemoFixture.php localhost:portYouAreListening \"[debug]\"\nphp ./Tests/sampleProject/tests/PatternBundle/DataFixtures/LoadPatternFixture.php localhost:portYouAreListening \"[debug]\"\n\n./Tests/sampleProject/app/console s:stop\n\n./vendor/bin/phpunit\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feverycheck%2Ftest-api-rest-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feverycheck%2Ftest-api-rest-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feverycheck%2Ftest-api-rest-bundle/lists"}