mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Fixed the manifest not parsing interfaces which extended from multiple interfaces.
This commit is contained in:
parent
485ea3e41d
commit
54a5fc6a74
@ -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')
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user