summaryrefslogtreecommitdiff
path: root/tests/units/ExternalLink/AttachmentLinkTest.php
blob: 0211869cd143bd8a0cff5a48efea91f9c609c460 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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());
    }
}