/** * @return SourceInterface * @throws InvalidArgumentException * @throws UnexpectedValueException */ public function getSource() : SourceInterface { if ($this->source === null) { $this->setSource(SourceFactory::getInstance()); } return $this->source; }
/** * @expectedException \Crossjoin\Browscap\Exception\UnexpectedValueException * @expectedExceptionCode 1459069587 * * @covers ::getInstanceByClassName * * @throws InvalidArgumentException * @throws UnexpectedValueException */ public function testSourceClassNameWithoutInterface() { SourceFactory::setSourceClasses([self::class]); SourceFactory::getInstance(); }