{"id":21525323,"url":"https://github.com/elbformat/sulu-behat-bundle","last_synced_at":"2025-09-06T05:36:31.036Z","repository":{"id":36966318,"uuid":"444114849","full_name":"elbformat/sulu-behat-bundle","owner":"elbformat","description":"Adds Contexts and Helper to easily set-up behat tests in your sulu application","archived":false,"fork":false,"pushed_at":"2025-06-28T12:13:08.000Z","size":81,"stargazers_count":2,"open_issues_count":11,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-30T10:44:41.302Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elbformat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-03T15:46:31.000Z","updated_at":"2022-06-24T07:29:02.000Z","dependencies_parsed_at":"2023-10-11T07:40:00.987Z","dependency_job_id":"fad9754a-4620-49aa-9f1e-c359fbd8cc6f","html_url":"https://github.com/elbformat/sulu-behat-bundle","commit_stats":{"total_commits":15,"total_committers":3,"mean_commits":5.0,"dds":0.2666666666666667,"last_synced_commit":"10b5b17a2a4852db779ce891e8743f8a80413cf8"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/elbformat/sulu-behat-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elbformat%2Fsulu-behat-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elbformat%2Fsulu-behat-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elbformat%2Fsulu-behat-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elbformat%2Fsulu-behat-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elbformat","download_url":"https://codeload.github.com/elbformat/sulu-behat-bundle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elbformat%2Fsulu-behat-bundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271246912,"owners_count":24725901,"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","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-24T01:34:30.517Z","updated_at":"2025-08-20T00:36:03.657Z","avatar_url":"https://github.com/elbformat.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sulu-behat-bundle\n\nAdds Contexts and Helper to easily set-up behat tests in your sulu application.\nIt makes use of the [symfony-behat-bundle](https://github.com/elbformat/symfony-behat-bundle).\n\n## Installation\n\n1. Add the bundle via composer\n```console\ncomposer require elbformat/sulu-behat-bundle\n```\n\n2. Activate bundles in `config/bundles.php`\n```php\nElbformat\\SymfonyBehatBundle\\ElbformatSymfonyBehatBundle::class =\u003e ['test' =\u003e true],\nElbformat\\SuluBehatBundle\\ElbformatSuluBehatBundle::class =\u003e ['test' =\u003e true],\n```\n\n3. Configure behat Extensions\n\nAdd the extension to your `behat.yml`. With the `context` parameter you can decide if the sulu kernel for this profile is\nrunning in `website` or `admin` (default) context. It's recommended to use tags to sort features into suites.\nAlso make sure the [symfony extension](https://github.com/FriendsOfBehat/SymfonyExtension) is enabled and configured.\n\n**NOTE**: The `FriendsOfBehat\\SymfonyExtension` must be placed *before* the `SuluExtension`.\n\nYou can then add Contexts as you like/need.\n\n```yml\ndefault:\n  suites:\n    default:\n      filters:\n        tags: '~@admin'\n      contexts:\n        - Elbformat\\SymfonyBehatBundle\\Context\\CommandContext:\n        - Elbformat\\SymfonyBehatBundle\\Context\\LoggingContext:\n        - Elbformat\\SuluBehatBundle\\Context\\BrowserContext:\n        - Elbformat\\SuluBehatBundle\\Context\\DateContext:\n        - Elbformat\\SuluBehatBundle\\Context\\SuluPageContext:\n        - Elbformat\\SuluBehatBundle\\Context\\SuluSnippetContext:\n        - Elbformat\\SuluBehatBundle\\Context\\SuluMediaContext:\n        # Only enable, when you have the according bundle installed\n        #- Elbformat\\SuluBehatBundle\\Context\\SuluArticleContext:\n        #- Elbformat\\SuluBehatBundle\\Context\\SuluFormContext:\n  extensions:\n    FriendsOfBehat\\SymfonyExtension: ~\n    Elbformat\\SuluBehatBundle\\SuluExtension:\n      context: website\nadmin:\n  suites:\n    default:\n      filters:\n        tags: '@admin'\n  extensions:\n    FriendsOfBehat\\SymfonyExtension:\n      bootstrap: 'tests/bootstrap.php'\n    Elbformat\\SuluBehatBundle\\SuluExtension:\n      context: admin\n```\n\n## Run tests\nMake sure you have a database configured for the test environment.\nIt's recommended to have an extra database configured for tests in `.env.test`, to not accidentally delete real contents.\nAfter configuration you should initialise it once, before running any test against it.\n\n```shell\nbin/console -e test sulu:build prod\n```\n\nYou can then run the tests in default oder admin profile.\n```shell\nvendor/bin/behat\nvendor/bin/behat --profile admin\n```\n\n## Examples\nFirst you should take a look at the [symfony examples](https://github.com/elbformat/symfony-behat-bundle/blob/main/doc/examples.md). More sulu specific examples can be found in [features/ folder](https://github.com/elbformat/sulu-behat-bundle/features).\n\n## Recommended bundles\nThere are contexts, that can ony be enabled when the according bundles are installed.\n* SuluArticleContext requires [SuluArticleBundle](https://github.com/sulu/SuluArticleBundle)\n* SuluFormContext requires [SuluFormBundle](https://github.com/sulu/SuluFormBundle)\n\n## What's next?\nPossible enhancements for the next release could be\n* SuluCommunityContext for SuluCommunityBundle\n* More examples with more content-types","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felbformat%2Fsulu-behat-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felbformat%2Fsulu-behat-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felbformat%2Fsulu-behat-bundle/lists"}