Skip to content

Commit b8cc617

Browse files
committed
Detect when the parser is giving back too many properties
1 parent 2d026e5 commit b8cc617

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/Mf2/MicroformatsTestSuiteTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ public function compareJson($correct, $test)
2828
$this->assertArrayHasKey($key, $test);
2929
$this->compareJson($value, $test[$key]);
3030
}
31+
foreach (array_diff(array_keys($test), array_keys($correct)) as $fault) {
32+
// This will always fail, but we want to know in which tests this happens!
33+
$this->assertArrayHasKey(
34+
$fault,
35+
$correct,
36+
'The parser output included an extra property compared.'
37+
);
38+
}
3139
} else {
3240
$this->assertEquals($correct, $test);
3341
}

0 commit comments

Comments
 (0)