public function testCreateDriver()
 {
     /** @var m\MockInterface $driver_factory */
     $driver_factory = $this->driverFactoryRegistry->get('selenium2');
     $driver_factory->shouldReceive('createDriver')->with($this->browser)->once()->andReturn('OK');
     $this->assertEquals('OK', $this->browser->createDriver());
 }
示例#2
0
 /**
  * Creates new session based on browser configuration.
  *
  * @param BrowserConfiguration $browser Browser configuration.
  *
  * @return Session
  */
 public function createSession(BrowserConfiguration $browser)
 {
     return new SessionProxy($browser->createDriver());
 }