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