Ejemplo n.º 1
0
 /**
  * Creates the browser configuration.
  *
  * @param IMinkDriverFactory $factory Driver factory.
  *
  * @return BrowserConfiguration
  */
 protected function createBrowserConfiguration(IMinkDriverFactory $factory)
 {
     $di = new DIContainer();
     $event_dispatcher = m::mock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
     $browser_configuration = new BrowserConfiguration($event_dispatcher, $di['driver_factory_registry']);
     $browser_configuration->setDriver($factory->getDriverName());
     return $browser_configuration;
 }
 public function testSetDriverCorrect()
 {
     $expected = 'zombie';
     $this->assertEquals($this->browser, $this->browser->setDriver($expected));
     $this->assertSame($expected, $this->browser->getDriver());
 }