mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-10 05:14:27 +02:00
Implement register subscribed events from addons
This commit is contained in:
parent
a85343dbed
commit
57ddf69d1c
6 changed files with 77 additions and 7 deletions
|
@ -55,6 +55,22 @@ class AddonProxyTest extends TestCase
|
|||
$addon->getProvidedDependencyRules();
|
||||
}
|
||||
|
||||
public function testGetSubscribedEventsCallsBootstrap(): void
|
||||
{
|
||||
$bootstrap = $this->createMock(AddonBootstrap::class);
|
||||
$bootstrap->expects($this->once())->method('getSubscribedEvents')->willReturn(['foo' => 'bar']);
|
||||
|
||||
$addon = new AddonProxy($bootstrap);
|
||||
|
||||
$this->assertSame(
|
||||
[
|
||||
['foo', [$bootstrap, 'bar']],
|
||||
],
|
||||
$addon->getSubscribedEvents()
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
public function testInitAddonCallsBootstrap(): void
|
||||
{
|
||||
$bootstrap = $this->createMock(AddonBootstrap::class);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue