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

50 lines
1.2 KiB
PHP
Raw Normal View History

2016-06-14 09:03:23 +00:00
<?php
2016-06-15 07:36:06 +00:00
use Behat\Behat\Tester\Exception\PendingException;
2016-06-14 09:03:23 +00:00
use Behat\Behat\Context\Context;
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
2016-06-15 07:36:06 +00:00
use Behat\MinkExtension\Context\MinkContext;
2016-06-14 09:03:23 +00:00
/**
* Defines application features from the specific context.
*/
2016-06-15 07:36:06 +00:00
class FeatureContext extends MinkContext implements Context, SnippetAcceptingContext
2016-06-14 09:03:23 +00:00
{
/**
* 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()
{
}
2016-06-15 07:36:06 +00:00
/**
* @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);
}
2016-06-14 09:03:23 +00:00
}