Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Sulu Behat Bundle

Sulu Behat Bundle Laravel Package

elbformat/sulu-behat-bundle

Adds Behat contexts and helpers for easily setting up tests in Sulu applications, built on symfony-behat-bundle. Configure website or admin context per profile, tag features into suites, and use ready-made contexts for pages, snippets, media, dates, and more.

View on GitHub
Deep Wiki
Context7

Adds Contexts and Helper to easily set-up behat tests in your sulu application

Frequently asked questions about Sulu Behat Bundle
Does elbformat/sulu-behat-bundle work with Laravel?
No. It is Sulu/Symfony test tooling, not a Laravel-native package, and the evaluation says it should not be adopted for a Laravel-only stack. You can still require it with Composer, but there is no Laravel integration or Laravel-specific Behat setup in this bundle. If your application is Laravel-first without Sulu, architecture fit is low.
How do I install sulu-behat-bundle in a Sulu application?
Run composer require elbformat/sulu-behat-bundle, then register ElbformatSymfonyBehatBundle and ElbformatSuluBehatBundle in config/bundles.php with ['test' => true]. Add the SymfonyExtension and ElbformatSuluBehatBundle SuluExtension to behat.yml, keeping FriendsOfBehat SymfonyExtension before SuluExtension. Then add the contexts you need to the suite configuration.
Which Sulu versions does sulu-behat-bundle support?
v2.0.0 requires Sulu 3 and explicitly drops Sulu 2 support. Teams still on Sulu 2 should pin to the 1.x line and defer the v2 upgrade until the CMS migration is complete. Confirm your Behat, Symfony, and PHP versions against the new GitHub Actions matrix before upgrading.
How do I configure website and admin contexts in behat.yml?
Define the SuluExtension in behat.yml and set context: website for your website profile or context: admin for the admin profile. The FriendsOfBehat SymfonyExtension must be declared before the SuluExtension. The profile controls which Sulu kernel context is used for that suite.
Which Behat contexts are included for pages, snippets, and media?
The bundle provides BrowserContext, DateContext, SuluPageContext, SuluSnippetContext, and SuluMediaContext, plus CommandContext and LoggingContext from symfony-behat-bundle. SuluArticleContext and SuluFormContext are optional and should only be enabled when the corresponding bundles are installed. The v2 contexts are described as not feature-complete, so validate them against your scenario inventory.
How do I filter features into admin and website suites?
Use Behat suite filters with tags, such as filters: tags: '~@admin' for the default website suite and tags: '@admin' for the admin suite. Tag admin-only features with @admin and leave website features in the default suite. Separate profiles let each suite use the correct Sulu kernel context.
How should I set up an isolated test database for Sulu Behat tests?
Configure a dedicated test database in .env.test so tests do not delete real content. Initialize it once with bin/console -e test sulu:build prod before running Behat. Then run your Behat profiles against that isolated test environment.
What changed in v2.0.0 for child-page Gherkin steps?
v2.0.0 removes the Gherkin step Given there is a(n) (:template) page as child of :parentId. Replace those feature rows with explicit _parentId or _parentSlug values and adjust the url values to match the new parent/child structure. Treat this as a test-code migration and inventory affected feature files before upgrading.
Does sulu-behat-bundle support YAML or JSON argument fixtures?
Yes, v2.0.0 adds an argument-fetching layer through elbformat/symfony-behat-bundle ^1.6 that supports tables, YAML, and JSON. This changes fixture behavior and adds a dependency you need to govern. If Gherkin tables are sufficient for your scenarios, assess whether the new dependency and migration are worth it.
Is sulu-behat-bundle safe to run in production or only in tests?
Register both bundles only in the test environment, and point tests at the isolated .env.test database. This package is test automation tooling, not application runtime code, so it should not be enabled in production. Keep prod content out of reach by never running sulu:build prod against the production database.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log