DrupalExtension is an extension for Behat which makes it easier to test a Drupal application. One of it's features is that it allows normal Drupal modules to provide Behat sub contexts by simply implementing them in a file called module_name.behat.inc within the module. Sub contexts allow you to provide new step definitions to Behat.

It seems like a great idea to me for bean to provide a Behat subcontext which allows a developer to assert the existence of a bean during a behat test

CommentFileSizeAuthor
#2 bean-behat-2588541-1.patch3.06 KBjohnennew

Comments

ceng created an issue. See original summary.

johnennew’s picture

StatusFileSize
new3.06 KB

Please find an initial patch which has the following step definitions

Given there is no bean with label "this is a test bean"

This is a Given step which sets up the scenario's initial state ensuring the bean which will probably be created during the test does not exist

Then there should be a bean with label "this is a test bean"

This is a Then assertion step which will error if the bean does not exist.

johnennew’s picture

Status: Active » Needs review

Needs review ...

johnennew’s picture

Issue summary: View changes