mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #30 from ajshort/master
BUGFIX: Fixed Interfaces Which Extend Multiple Interfaces Not Being Loaded
This commit is contained in:
commit
5b63bacb45
@ -60,13 +60,7 @@ class SS_ClassManifest {
|
|||||||
return new TokenisedRegularExpression(array(
|
return new TokenisedRegularExpression(array(
|
||||||
0 => T_INTERFACE,
|
0 => T_INTERFACE,
|
||||||
1 => T_WHITESPACE,
|
1 => T_WHITESPACE,
|
||||||
2 => array(T_STRING, 'can_jump_to' => 7, 'save_to' => 'interfaceName'),
|
2 => array(T_STRING, '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 => '{',
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,10 @@ implements InterfaceA, InterfaceB {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface InterfaceC extends InterfaceA, InterfaceB {
|
||||||
|
}
|
||||||
|
interface InterfaceD extends InterfaceA, InterfaceB, InterfaceC {
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
PHP
|
PHP
|
||||||
);
|
);
|
||||||
@ -88,8 +92,8 @@ PHP
|
|||||||
if($matches) foreach($matches as $match) $interfaces[$match['interfaceName']] = $match;
|
if($matches) foreach($matches as $match) $interfaces[$match['interfaceName']] = $match;
|
||||||
|
|
||||||
$this->assertArrayHasKey('InterfaceA', $interfaces);
|
$this->assertArrayHasKey('InterfaceA', $interfaces);
|
||||||
|
|
||||||
$this->assertArrayHasKey('InterfaceB', $interfaces);
|
$this->assertArrayHasKey('InterfaceB', $interfaces);
|
||||||
$this->assertEquals('Something', $interfaces['InterfaceB']['extends']);
|
$this->assertArrayHasKey('InterfaceC', $interfaces);
|
||||||
|
$this->assertArrayHasKey('InterfaceD', $interfaces);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user