Add external links for tasks with plugin api
This commit is contained in:
18
tests/units/ExternalLink/AttachmentLinkTest.php
Normal file
18
tests/units/ExternalLink/AttachmentLinkTest.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__.'/../Base.php';
|
||||
|
||||
use Kanboard\ExternalLink\AttachmentLink;
|
||||
|
||||
class AttachmentLinkTest extends Base
|
||||
{
|
||||
public function testGetTitleFromUrl()
|
||||
{
|
||||
$url = 'https://kanboard.net/folder/document.pdf';
|
||||
|
||||
$link = new AttachmentLink($this->container);
|
||||
$link->setUrl($url);
|
||||
$this->assertEquals($url, $link->getUrl());
|
||||
$this->assertEquals('document.pdf', $link->getTitle());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user