report.=$testdox; $xml = simplexml_load_file($xml_path); $this->process($xml); } public function post($url, $user, $pass, $repoUser, $repo){ // open connection and repo $client=new Client($url, $user, $pass); $repo=$client->getRepo($repoUser, $repo); // create the issue $issue=$repo->createIssue([ 'title'=>'Test Results', 'body'=>$this->report ]); } private function process($item){ if(isset($item->testcase)){ foreach($item->testcase as $testcase) { foreach($testcase as $k=>$v){ $this->report.="\n```plain\n".print_r($testcase,true)."\n```"; } } } if(isset($item->testsuite)){ foreach($item->testsuite as $testsuite) { $this->process($testsuite); } } } }