diff --git a/src/Behat/MinkExtension/Context/MinkContext.php b/src/Behat/MinkExtension/Context/MinkContext.php index c29de8c..01812c9 100644 --- a/src/Behat/MinkExtension/Context/MinkContext.php +++ b/src/Behat/MinkExtension/Context/MinkContext.php @@ -317,6 +317,16 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface $this->assertSession()->elementContains('css', $element, $this->fixStepArgument($value)); } + /** + * Checks, that element with specified CSS doesn't contain specified HTML. + * + * @Then /^the "(?P[^"]*)" element should not contain "(?P(?:[^"]|\\")*)"$/ + */ + public function assertElementNotContains($element, $value) + { + $this->assertSession()->elementNotContains('css', $element, $this->fixStepArgument($value)); + } + /** * Checks, that element with specified CSS exists on page. * diff --git a/src/Behat/MinkExtension/Context/MinkDictionary.php b/src/Behat/MinkExtension/Context/MinkDictionary.php index abe096f..8161aa0 100644 --- a/src/Behat/MinkExtension/Context/MinkDictionary.php +++ b/src/Behat/MinkExtension/Context/MinkDictionary.php @@ -383,6 +383,16 @@ trait MinkDictionary $this->assertSession()->elementContains('css', $element, $this->fixStepArgument($value)); } + /** + * Checks, that element with specified CSS doesn't contain specified HTML. + * + * @Then /^the "(?P[^"]*)" element should not contain "(?P(?:[^"]|\\")*)"$/ + */ + public function assertElementNotContains($element, $value) + { + $this->assertSession()->elementNotContains('css', $element, $this->fixStepArgument($value)); + } + /** * Checks, that element with specified CSS exists on page. *