BUGFIX: Fixed the manifest not parsing interfaces which extended from multiple interfaces.

This commit is contained in:
ajshort 2011-04-19 13:52:20 +10:00
parent 485ea3e41d
commit 54a5fc6a74
2 changed files with 7 additions and 9 deletions

View File

@ -60,13 +60,7 @@ class SS_ClassManifest {
return new TokenisedRegularExpression(array(
0 => T_INTERFACE,
1 => T_WHITESPACE,
2 => array(T_STRING, 'can_jump_to' => 7, 'save_to' => 'interfaceName'),
3 => T_WHITESPACE,
4 => T_EXTENDS,
5 => T_WHITESPACE,
6 => array(T_STRING, 'save_to' => 'extends'),
7 => array(T_WHITESPACE, 'optional' => true),
8 => '{',
2 => array(T_STRING, 'save_to' => 'interfaceName')
));
}

View File

@ -43,6 +43,10 @@ implements InterfaceA, InterfaceB {
}
interface InterfaceC extends InterfaceA, InterfaceB {
}
interface InterfaceD extends InterfaceA, InterfaceB, InterfaceC {
}
?>
PHP
);
@ -88,8 +92,8 @@ PHP
if($matches) foreach($matches as $match) $interfaces[$match['interfaceName']] = $match;
$this->assertArrayHasKey('InterfaceA', $interfaces);
$this->assertArrayHasKey('InterfaceB', $interfaces);
$this->assertEquals('Something', $interfaces['InterfaceB']['extends']);
$this->assertArrayHasKey('InterfaceC', $interfaces);
$this->assertArrayHasKey('InterfaceD', $interfaces);
}
}