private function countSummary($dstFile){
        $tests = (new \DOMXPath($dstFile))->query("//table/tr[contains(@class,'scenarioRow')]");
        foreach($tests as $test){
            $class = str_replace('scenarioRow ', '', $test->getAttribute('class'));
            switch($class){
                case 'scenarioSuccess':
                    $this->countSuccess += 0.5;
                    break;
                case 'scenarioFailed':
                    $this->countFailed += 0.5;
                    break;
                case 'scenarioSkipped':
                    $this->countSkipped += 0.5;
                    break;
                case 'scenarioIncomplete':
                    $this->countIncomplete += 0.5;
                    break;
            }
        }
    }
private function countSummary($dstFile){
        $tests = (new \DOMXPath($dstFile))->query("//table/tr[contains(@class,'scenarioRow')]");
        foreach($tests as $test){
            $class = str_replace('scenarioRow ', '', $test->getAttribute('class'));
            switch($class){
                case 'scenarioSuccess':
                    $this->countSuccess += 0.5;
                    break;
                case 'scenarioFailed':
                    $this->countFailed += 0.5;
                    break;
                case 'scenarioSkipped':
                    $this->countSkipped += 0.5;
                    break;
                case 'scenarioIncomplete':
                    $this->countIncomplete += 0.5;
                    break;
            }
        }
    }
private function countSummary ( $ dstFile ) { $ tests = ( new \ DOMXPath ( $ dstFile ) ) -> query ( "//table/tr[contains(@class,'scenarioRow')]" ) ; foreach ( $ tests as $ test ) { $ class = str_replace ( 'scenarioRow ' , '' , $ test -> getAttribute ( 'class' ) ) ; switch ( $ class ) { case 'scenarioSuccess' : $ this -> countSuccess += 0.5 ; break ; case 'scenarioFailed' : $ this -> countFailed += 0.5 ; break ; case 'scenarioSkipped' : $ this -> countSkipped += 0.5 ; break ; case 'scenarioIncomplete' : $ this -> countIncomplete += 0.5 ; break ; } } }
This function counts all types of tests' scenarios and writes in class members
@param $dstFile \DOMDocument - destination file
This function counts all types of tests scenarios and writes in class members