addReader() публичный Метод

adds a new reader to this collection
public addReader ( BrowscapPHP\Util\Logfile\ReaderInterface $reader ) : ReaderCollection
$reader BrowscapPHP\Util\Logfile\ReaderInterface
Результат ReaderCollection
 /**
  * @expectedException \BrowscapPHP\Exception\ReaderException
  * @expectedExceptionMessage Cannot extract user agent string from line "Test"
  */
 public function testReadNotSuccessFull()
 {
     $reader = $this->getMock('\\BrowscapPHP\\Util\\Logfile\\ApacheCommonLogFormatReader', array('test', 'read'), array(), '', false);
     $reader->expects(self::once())->method('test')->will(self::returnValue(false));
     $reader->expects(self::never())->method('read')->will(self::returnValue('TestUA'));
     $this->object->addReader($reader);
     $this->object->read('Test');
 }
 /**
  * @expectedException \BrowscapPHP\Exception\ReaderException
  * @expectedExceptionMessage Cannot extract user agent string from line "Test"
  */
 public function testReadNotSuccessFull()
 {
     $reader = $this->getMockBuilder(\BrowscapPHP\Util\Logfile\ApacheCommonLogFormatReader::class)->disableOriginalConstructor()->setMethods(['test', 'read'])->getMock();
     $reader->expects(self::once())->method('test')->will(self::returnValue(false));
     $reader->expects(self::never())->method('read')->will(self::returnValue('TestUA'));
     $this->object->addReader($reader);
     $this->object->read('Test');
 }