actionFactory = new ActionFactory(); } public function testNewLinkAction() { $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() { $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()); } }