BrowscapPHP\Util\Logfile\ReaderCollection::test PHP Method

test() public method

public test ( string $line ) : boolean
$line string
return boolean
    public function test($line)
    {
        foreach ($this->readers as $reader) {
            if ($reader->test($line)) {
                return true;
            }
        }
        return false;
    }

Usage Example

コード例 #1
0
 /**
  *
  */
 public function testTestNotSuccessFull()
 {
     /** @var \BrowscapPHP\Util\Logfile\ApacheCommonLogFormatReader $reader */
     $reader = $this->getMock('\\BrowscapPHP\\Util\\Logfile\\ApacheCommonLogFormatReader', array('test'), array(), '', false);
     $reader->expects(self::once())->method('test')->will(self::returnValue(false));
     $this->object->addReader($reader);
     self::assertFalse($this->object->test('Test'));
 }
All Usage Examples Of BrowscapPHP\Util\Logfile\ReaderCollection::test