This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
oliverdavies.uk-old-sculpin/features/bootstrap/FeatureContext.php
2016-06-15 08:36:06 +01:00

50 lines
1.2 KiB
PHP

<?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 extends MinkContext implements Context, SnippetAcceptingContext
{
/**
* Initializes context.
*
* Every scenario gets its own context instance.
* You can also pass arbitrary arguments to the
* context constructor through behat.yml.
*/
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);
}
}