Created
February 27, 2012 15:35
-
-
Save msanroman/1924704 to your computer and use it in GitHub Desktop.
FeatureContext
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Runroom\BaseBundle\Features\Context; | |
use Behat\BehatBundle\Context\BehatContext, | |
Behat\BehatBundle\Context\MinkContext; | |
use Behat\Behat\Context\ClosuredContextInterface, | |
Behat\Behat\Context\TranslatedContextInterface, | |
Behat\Behat\Exception\PendingException; | |
use Behat\Gherkin\Node\PyStringNode, | |
Behat\Gherkin\Node\TableNode; | |
// | |
// Require 3rd-party libraries here: | |
// | |
// require_once 'PHPUnit/Autoload.php'; | |
// require_once 'PHPUnit/Framework/Assert/Functions.php'; | |
// | |
/** | |
* Feature context. | |
*/ | |
class FeatureContext extends MinkContext //MinkContext if you want to test web | |
{ | |
/** | |
* @When /^I click on the "([^"]*)" logo$/ | |
*/ | |
public function iClickOnTheLogo($sectionName) | |
{ | |
$session = $this->getSession(); | |
$page = $session->getPage(); | |
$logo = $page->find('css', 'h2.Playground'.$sectionName)->find('xpath', '..'); | |
$logo->click(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment