public function hasErrors()
{
foreach ($this->xml->xpath("//batch:status/@code") as $el) {
if ($el->__toString() !== "200") {
return true;
}
}
return false;
}
public function testHasErrors() { $this->assertFalse($this->batchResponse->hasErrors()); $batchResponse = new BatchResponse($this->getSimpleXMLElement("batch-response-error")); $this->assertTrue($batchResponse->hasErrors()); }