Beispiel #1
0
 public function testOpenWithParamsCorrect()
 {
     $url = 'http://domain.tld/RL';
     $expected = $url . '?param=value';
     $params = array('param' => 'value');
     /* @var IUrlFactory $url_builder_factory */
     $url_builder_factory = new $this->urlFactoryClass();
     $this->session->shouldReceive('visit')->with($expected)->once();
     $this->page->setUrlBuilder($url_builder_factory->getBuilder(parse_url($url)));
     $this->assertSame($this->page, $this->page->open($params));
 }
Beispiel #2
0
 public function testOpened()
 {
     $this->pageFactory->shouldReceive('opened')->with($this->page)->once()->andReturn('OK');
     $this->assertEquals('OK', $this->page->opened());
 }