Merge pull request #45 from khepin/element_should_not_contain
Add "element should contain" counter part "should NOT contain"
This commit is contained in:
@@ -317,6 +317,16 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface
|
|||||||
$this->assertSession()->elementContains('css', $element, $this->fixStepArgument($value));
|
$this->assertSession()->elementContains('css', $element, $this->fixStepArgument($value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks, that element with specified CSS doesn't contain specified HTML.
|
||||||
|
*
|
||||||
|
* @Then /^the "(?P<element>[^"]*)" element should not contain "(?P<value>(?:[^"]|\\")*)"$/
|
||||||
|
*/
|
||||||
|
public function assertElementNotContains($element, $value)
|
||||||
|
{
|
||||||
|
$this->assertSession()->elementNotContains('css', $element, $this->fixStepArgument($value));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks, that element with specified CSS exists on page.
|
* Checks, that element with specified CSS exists on page.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -383,6 +383,16 @@ trait MinkDictionary
|
|||||||
$this->assertSession()->elementContains('css', $element, $this->fixStepArgument($value));
|
$this->assertSession()->elementContains('css', $element, $this->fixStepArgument($value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks, that element with specified CSS doesn't contain specified HTML.
|
||||||
|
*
|
||||||
|
* @Then /^the "(?P<element>[^"]*)" element should not contain "(?P<value>(?:[^"]|\\")*)"$/
|
||||||
|
*/
|
||||||
|
public function assertElementNotContains($element, $value)
|
||||||
|
{
|
||||||
|
$this->assertSession()->elementNotContains('css', $element, $this->fixStepArgument($value));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks, that element with specified CSS exists on page.
|
* Checks, that element with specified CSS exists on page.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user