public function testOpenWithParamsCorrect() { $url = 'http://domain.tld/RL'; $expected = $url . '?param=value'; $params = array('param' => 'value'); /* @var IUrlBuilderFactory $url_builder_factory */ $url_builder_factory = new $this->urlBuilderFactoryClass(); $this->session->shouldReceive('visit')->with($expected)->once()->andReturnNull(); $this->page->setUrlBuilder($url_builder_factory->getUrlBuilder($url)); $this->assertSame($this->page, $this->page->open($params)); }
/** * Initialize the page. * * @param BEMPageFactory $page_factory Page factory. */ public function __construct(BEMPageFactory $page_factory) { parent::__construct($page_factory); $this->pageFactory = $page_factory; }