You are here

public function NamedSelectorTest::testRegisterXpath in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/behat/mink/tests/Selector/NamedSelectorTest.php \Behat\Mink\Tests\Selector\NamedSelectorTest::testRegisterXpath()

File

vendor/behat/mink/tests/Selector/NamedSelectorTest.php, line 10

Class

NamedSelectorTest

Namespace

Behat\Mink\Tests\Selector

Code

public function testRegisterXpath() {
  $selector = $this
    ->getSelector();
  $selector
    ->registerNamedXpath('some', 'my_xpath');
  $this
    ->assertEquals('my_xpath', $selector
    ->translateToXPath('some'));
  $this
    ->setExpectedException('InvalidArgumentException');
  $selector
    ->translateToXPath('custom');
}