summaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/CapabilitiesContext.php
diff options
context:
space:
mode:
Diffstat (limited to 'build/integration/features/bootstrap/CapabilitiesContext.php')
-rw-r--r--build/integration/features/bootstrap/CapabilitiesContext.php20
1 files changed, 12 insertions, 8 deletions
diff --git a/build/integration/features/bootstrap/CapabilitiesContext.php b/build/integration/features/bootstrap/CapabilitiesContext.php
index a1a14aa3bb3..4e200bdf421 100644
--- a/build/integration/features/bootstrap/CapabilitiesContext.php
+++ b/build/integration/features/bootstrap/CapabilitiesContext.php
@@ -29,15 +29,19 @@ class CapabilitiesContext implements Context, SnippetAcceptingContext {
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']);
- }
+ $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']->$row['value'];
- if ( !$answeredValue === $row['value']){
- PHPUnit_Framework_Assert::fail("Answered value $answeredValue is different to expected " . $row['value']);
- }
+ $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']
+ );
}
}
}