summaryrefslogtreecommitdiff
path: root/tests/units/ExternalLink/AttachmentLinkTest.php
blob: f2a5b82c3315fd1894f716182d0da3e851c845eb (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.org/folder/document.pdf';

        $link = new AttachmentLink($this->container);
        $link->setUrl($url);
        $this->assertEquals($url, $link->getUrl());
        $this->assertEquals('document.pdf', $link->getTitle());
    }
}