Merge pull request #30 from ajshort/master

BUGFIX: Fixed Interfaces Which Extend Multiple Interfaces Not Being Loaded
This commit is contained in:
Will Rossiter 2011-05-11 18:57:01 -07:00
commit 5b63bacb45
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);
}
}