/** * Registers a browser configuration. * * @param BrowserConfiguration $browser Browser configuration. * * @return void * @throws \InvalidArgumentException When browser configuration is already registered. */ public function register(BrowserConfiguration $browser) { $type = $browser->getType(); if (isset($this->browserConfigurations[$type])) { throw new \InvalidArgumentException('Browser configuration with type "' . $type . '" is already registered'); } $this->browserConfigurations[$type] = $browser; }
public function testGetType() { $this->assertEquals('default', $this->browser->getType()); }