{"id":15022853,"url":"https://github.com/facile-it/symfony-functional-testcase","last_synced_at":"2025-09-30T10:30:32.671Z","repository":{"id":48061884,"uuid":"174154554","full_name":"facile-it/symfony-functional-testcase","owner":"facile-it","description":"A base test case to speed up functional tests in Symfony -- this is a slimmed down fork of  liip/LiipFunctionalTestBundle","archived":false,"fork":true,"pushed_at":"2024-03-15T08:18:41.000Z","size":1029,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"1.x","last_synced_at":"2024-03-26T00:03:42.766Z","etag":null,"topics":["phpunit","symfony","testing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"liip/LiipFunctionalTestBundle","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/facile-it.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-06T13:52:55.000Z","updated_at":"2023-07-19T13:45:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/facile-it/symfony-functional-testcase","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facile-it%2Fsymfony-functional-testcase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facile-it%2Fsymfony-functional-testcase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facile-it%2Fsymfony-functional-testcase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facile-it%2Fsymfony-functional-testcase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/facile-it","download_url":"https://codeload.github.com/facile-it/symfony-functional-testcase/tar.gz/refs/heads/1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234724889,"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","testing"],"created_at":"2024-09-24T19:58:27.369Z","updated_at":"2025-09-30T10:30:32.343Z","avatar_url":"https://github.com/facile-it.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# facile-it/symfony-functional-testcase\n\n![Build status](https://github.com/facile-it/symfony-functional-testcase/workflows/CI/badge.svg)\n[![Latest Stable Version](https://poser.pugx.org/facile-it/symfony-functional-testcase/v/stable)](https://packagist.org/packages/facile-it/symfony-functional-testcase)\n[![Latest Unstable Version](https://poser.pugx.org/facile-it/symfony-functional-testcase/v/unstable)](https://packagist.org/packages/facile-it/symfony-functional-testcase)\n[![Codecov coverage status](https://codecov.io/gh/facile-it/symfony-functional-testcase/branch/master/graph/badge.svg)](https://codecov.io/gh/facile-it/symfony-functional-testcase)\n\nThis is a small base TestCase for PHPUnit functional tests in Symfony that provides a simple `getContainer()` helper, \nalongside with some small caching to speed up the tests. \n\nForked (and slimmed down) from [liip/LiipFunctionalTestBundle](https://github.com/liip/LiipFunctionalTestBundle). \n\n# Installation\n```bash\n$ composer require --dev facile-it/symfony-functional-testcase\n```\n\n# Usage\nTo use this in one of your functional tests, you just have to edit it like this:\n\n```diff\n\u003c?php\n\nnamespace Tests;\n\n-use Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase;\n+use Facile\\SymfonyFunctionalTestCase\\WebTestCase;\n\nclass SomeTest extends WebTestCase\n{\n```\n\n# Functionalities\n\n#### Check HTTP status codes\n\n##### isSuccessful()\n\nCheck that the request succedded:\n\n```php\n$client = $this-\u003emakeClient();\n$client-\u003erequest('GET', '/contact');\n\n// Successful HTTP request\n$this-\u003eisSuccessful($client-\u003egetResponse());\n```\n\nAdd `false` as the second argument in order to check that the request failed:\n\n```php\n$client = $this-\u003emakeClient();\n$client-\u003erequest('GET', '/error');\n\n// Request returned an error\n$this-\u003eisSuccessful($client-\u003egetResponse(), false);\n```\n\nIn order to test more specific status codes, use `assertStatusCode()`:\n\n##### assertStatusCode()\n\nCheck the HTTP status code from the request:\n\n```php\n$client = $this-\u003emakeClient();\n$client-\u003erequest('GET', '/contact');\n\n// Standard response for successful HTTP request\n$this-\u003eassertStatusCode(302, $client);\n```\n\n## Command Tests\nTODO document `runCommand`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacile-it%2Fsymfony-functional-testcase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffacile-it%2Fsymfony-functional-testcase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacile-it%2Fsymfony-functional-testcase/lists"}