You are here

public function SelectorsHandlerTest::testRegisterSelectorThroughConstructor in Zircon Profile 8.0

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

File

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

Class

SelectorsHandlerTest

Namespace

Behat\Mink\Tests\Selector

Code

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