ParaTest\Logging\LogInterpreter::addReader PHP Method

addReader() public method

Add a new Reader to be included in the final results
public addReader ( ParaTest\Logging\JUnit\Reader $reader )
$reader ParaTest\Logging\JUnit\Reader
    public function addReader(Reader $reader)
    {
        $this->readers[] = $reader;
        return $this;
    }

Usage Example

Beispiel #1
0
 /**
  * Empty line attributes, e.g. line="" breaks Jenkins parsing since it needs to be an integer.
  * To repair, ensure that empty line attributes are actually written as 0 instead of empty string.
  */
 public function testThatEmptyLineAttributesConvertToZero()
 {
     $mixed = FIXTURES . DS . 'results' . DS . 'junit-example-result.xml';
     $reader = new Reader($mixed);
     $this->interpreter->addReader($reader);
     $writer = new Writer($this->interpreter, "test/fixtures/tests/");
     $xml = $writer->getXml();
     $this->assertFalse(strpos($xml, 'line=""'), 'Expected no empty line attributes (line=""), but found one.');
 }
All Usage Examples Of ParaTest\Logging\LogInterpreter::addReader