PHPUnit_TextUI_ResultPrinter::printDefects PHP Method

printDefects() protected method

protected printDefects ( array $defects, string $type )
$defects array
$type string
    protected function printDefects(array $defects, $type)
    {
        $count = count($defects);
        if ($count == 0) {
            return;
        }
        if ($this->defectListPrinted) {
            $this->write("\n--\n\n");
        }
        $this->write(sprintf("There %s %d %s%s:\n", $count == 1 ? 'was' : 'were', $count, $type, $count == 1 ? '' : 's'));
        $i = 1;
        if ($this->reverse) {
            $defects = array_reverse($defects);
        }
        foreach ($defects as $defect) {
            $this->printDefect($defect, $i++);
        }
        $this->defectListPrinted = true;
    }