You are here

public function SelectorsHandlerTest::testRegisterSelector in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/tests/Selector/SelectorsHandlerTest.php \Behat\Mink\Tests\Selector\SelectorsHandlerTest::testRegisterSelector()

File

vendor/behat/mink/tests/Selector/SelectorsHandlerTest.php, line 9

Class

SelectorsHandlerTest

Namespace

Behat\Mink\Tests\Selector

Code

public function testRegisterSelector() {
  $selector = $this
    ->getMockBuilder('Behat\\Mink\\Selector\\SelectorInterface')
    ->getMock();
  $handler = new SelectorsHandler();
  $this
    ->assertFalse($handler
    ->isSelectorRegistered('custom'));
  $handler
    ->registerSelector('custom', $selector);
  $this
    ->assertTrue($handler
    ->isSelectorRegistered('custom'));
  $this
    ->assertSame($selector, $handler
    ->getSelector('custom'));
}