actionFactory = new ActionFactory(); } public function testNewLinkAction(): void { $icon = 'icon-test'; $name = 'Test'; $href = 'some/url'; $action = $this->actionFactory->newLinkAction($icon, $name, $href); $this->assertInstanceOf(IAction::class, $action); $this->assertEquals($name, $action->getName()); $this->assertEquals(10, $action->getPriority()); } public function testNewEMailAction(): void { $icon = 'icon-test'; $name = 'Test'; $href = 'user@example.com'; $action = $this->actionFactory->newEMailAction($icon, $name, $href); $this->assertInstanceOf(IAction::class, $action); $this->assertEquals($name, $action->getName()); $this->assertEquals(10, $action->getPriority()); $this->assertEquals('mailto:user@example.com', $action->getHref()); } }