Ejemplo n.º 1
0
 /**
  * @group legacy
  */
 public function testBcLayer()
 {
     $selector = $this->getMockBuilder('Behat\\Mink\\Selector\\SelectorInterface')->getMock();
     $handler = new SelectorsHandler();
     $handler->registerSelector('named_partial', $selector);
     $this->assertSame($selector, $handler->getSelector('named'));
 }
Ejemplo n.º 2
0
 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'));
 }
Ejemplo n.º 3
0
 public function testBcLayer()
 {
     $selector = $this->getMockBuilder('Behat\\Mink\\Selector\\SelectorInterface')->getMock();
     $handler = new SelectorsHandler();
     $handler->registerSelector('named_partial', $selector);
     $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
     $this->assertSame($selector, $handler->getSelector('named'));
 }
Ejemplo n.º 4
0
 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'));
 }