getHash(); } $capabilitiesXML = $this->response->xml()->data->capabilities; foreach ($fd as $row) { if ($row['value'] === ''){ $answeredValue = (string)$capabilitiesXML->$row['capability']->$row['feature']; PHPUnit_Framework_Assert::assertEquals( $answeredValue, $row['value_or_subfeature'], "Failed field " . $row['capability'] . " " . $row['feature'] ); } else{ $answeredValue = (string)$capabilitiesXML->$row['capability']->$row['feature']->$row['value_or_subfeature']; PHPUnit_Framework_Assert::assertEquals( $answeredValue, $row['value'], "Failed field: " . $row['capability'] . " " . $row['feature'] . " " . $row['value_or_subfeature'] ); } } } }