Пример #1
0
 protected function setUp()
 {
     parent::setUp();
     $handler = m::mock('\\Behat\\Mink\\Selector\\SelectorsHandler');
     $handler->shouldReceive('selectorToXpath')->with('se', array('xpath' => 'XPATH'))->andReturn('XPATH');
     $handler->shouldReceive('selectorToXpath')->with('se', array('xpath' => 'XPATH_ROOT'))->andReturn('/XPATH');
     $this->selectorsHandler = $handler;
     $this->driver = m::mock('\\Behat\\Mink\\Driver\\DriverInterface');
     $this->session = m::mock('\\Behat\\Mink\\Session');
     $this->session->shouldReceive('getSelectorsHandler')->andReturn($this->selectorsHandler);
     $this->session->shouldReceive('getDriver')->andReturn($this->driver)->byDefault();
     $this->pageFactory = m::mock('\\aik099\\QATools\\PageObject\\IPageFactory');
     $this->pageFactory->shouldReceive('getSession')->andReturn($this->session);
 }