Add custom tests
This commit is contained in:
parent
8c11fb9195
commit
928dbde30f
6 changed files with 37 additions and 14 deletions
|
@ -1,14 +1,16 @@
|
|||
<?php
|
||||
|
||||
use Behat\Behat\Tester\Exception\PendingException;
|
||||
use Behat\Behat\Context\Context;
|
||||
use Behat\Behat\Context\SnippetAcceptingContext;
|
||||
use Behat\Gherkin\Node\PyStringNode;
|
||||
use Behat\Gherkin\Node\TableNode;
|
||||
use Behat\MinkExtension\Context\MinkContext;
|
||||
|
||||
/**
|
||||
* Defines application features from the specific context.
|
||||
*/
|
||||
class FeatureContext implements Context, SnippetAcceptingContext
|
||||
class FeatureContext extends MinkContext implements Context, SnippetAcceptingContext
|
||||
{
|
||||
/**
|
||||
* Initializes context.
|
||||
|
@ -20,4 +22,28 @@ class FeatureContext implements Context, SnippetAcceptingContext
|
|||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the active menu link should be :text
|
||||
*/
|
||||
public function theActiveMenuLinkShouldBe($text)
|
||||
{
|
||||
return $this->assertElementContains('.navbar .active a', $text);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the page title should be :text
|
||||
*/
|
||||
public function thePageTitleShouldBe($text)
|
||||
{
|
||||
return $this->assertElementContainsText('title', $text);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the page title should not be :text
|
||||
*/
|
||||
public function thePageTitleShouldNotBe($text)
|
||||
{
|
||||
return $this->assertElementNotContainsText('title', $text);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue