mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-10 17:34:27 +02:00
add support for legacy dependency config files
This commit is contained in:
parent
4fd8caaff7
commit
dc6735eb51
5 changed files with 44 additions and 5 deletions
|
@ -37,14 +37,18 @@ class LegacyAddonProxyTest extends TestCase
|
|||
);
|
||||
}
|
||||
|
||||
public function testGetProvidedDependencyRulesReturnsEmptyArray(): void
|
||||
public function testGetProvidedDependencyIncludesConfigFile(): void
|
||||
{
|
||||
$root = vfsStream::setup('addons', 0777, ['helloaddon' => []]);
|
||||
$root = vfsStream::setup('addons_4', 0777, ['helloaddon' => ['static' => []]]);
|
||||
|
||||
vfsStream::newFile('dependencies.config.php')
|
||||
->at($root->getChild('helloaddon/static'))
|
||||
->setContent('<?php return [\'name\' => []];');
|
||||
|
||||
$addon = new LegacyAddonProxy('helloaddon', $root->url());
|
||||
|
||||
$this->assertSame(
|
||||
[],
|
||||
['name' => []],
|
||||
$addon->getProvidedDependencyRules()
|
||||
);
|
||||
}
|
||||
|
@ -59,7 +63,6 @@ class LegacyAddonProxyTest extends TestCase
|
|||
[],
|
||||
$addon->getSubscribedEvents()
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
public function testInitAddonIncludesAddonFile(): void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue