getHash(); } $capabilitiesXML = $this->response->xml()->data->capabilities; foreach ($fd as $row) { if ($row['value'] === ''){ $answeredValue = (string)$capabilitiesXML->$row['capability']->$row['feature']->$row['value_or_subfeature']; if ( !$answeredValue === $row['value_or_subfeature']){ PHPUnit_Framework_Assert::fail("Answered value $answeredValue is different to expected " . $row['value_or_subfeature']); } } else{ $answeredValue = (string)$capabilitiesXML->$row['capability']->$row['feature']->$row['value_or_subfeature']->$row['value']; if ( !$answeredValue === $row['value']){ PHPUnit_Framework_Assert::fail("Answered value $answeredValue is different to expected " . $row['value']); } } } } }