Add Addon::getId() method

This commit is contained in:
Art4 2025-01-08 12:52:21 +00:00
parent 66fb982124
commit 1f25fe9bf5
8 changed files with 89 additions and 25 deletions

View file

@ -16,7 +16,7 @@ use PHPUnit\Framework\TestCase;
class LegacyAddonProxyTest extends TestCase
{
public function testCreateWithNameAndPath(): void
public function testCreateWithIdAndPath(): void
{
$root = vfsStream::setup('addons', 0777, ['helloaddon' => []]);
@ -25,6 +25,15 @@ class LegacyAddonProxyTest extends TestCase
$this->assertInstanceOf(Addon::class, $addon);
}
public function testGetIdReturnsId(): void
{
$root = vfsStream::setup('addons', 0777, ['helloaddon' => []]);
$addon = new LegacyAddonProxy('helloaddon', $root->url());
$this->assertSame('helloaddon', $addon->getId());
}
public function testGetRequiredDependenciesReturnsEmptyArray(): void
{
$root = vfsStream::setup('addons', 0777, ['helloaddon' => []]);