Update code base and doc to use kanboard.org domain

This commit is contained in:
Frédéric Guillot
2017-11-27 11:14:37 -08:00
parent dc70245907
commit 1db9bc1b2e
81 changed files with 387 additions and 304 deletions

View File

@@ -28,16 +28,16 @@ class AttachmentLinkProviderTest extends Base
{
$attachmentLinkProvider = new AttachmentLinkProvider($this->container);
$attachmentLinkProvider->setUserTextInput('https://kanboard.net/FILE.DOC');
$attachmentLinkProvider->setUserTextInput('https://kanboard.org/FILE.DOC');
$this->assertTrue($attachmentLinkProvider->match());
$attachmentLinkProvider->setUserTextInput('https://kanboard.net/folder/document.PDF');
$attachmentLinkProvider->setUserTextInput('https://kanboard.org/folder/document.PDF');
$this->assertTrue($attachmentLinkProvider->match());
$attachmentLinkProvider->setUserTextInput('https://kanboard.net/archive.zip');
$attachmentLinkProvider->setUserTextInput('https://kanboard.org/archive.zip');
$this->assertTrue($attachmentLinkProvider->match());
$attachmentLinkProvider->setUserTextInput(' https://kanboard.net/folder/archive.tar ');
$attachmentLinkProvider->setUserTextInput(' https://kanboard.org/folder/archive.tar ');
$this->assertTrue($attachmentLinkProvider->match());
$attachmentLinkProvider->setUserTextInput('http:// invalid url');
@@ -46,13 +46,13 @@ class AttachmentLinkProviderTest extends Base
$attachmentLinkProvider->setUserTextInput('');
$this->assertFalse($attachmentLinkProvider->match());
$attachmentLinkProvider->setUserTextInput('https://kanboard.net/folder/document.html');
$attachmentLinkProvider->setUserTextInput('https://kanboard.org/folder/document.html');
$this->assertFalse($attachmentLinkProvider->match());
$attachmentLinkProvider->setUserTextInput('https://kanboard.net/folder/DOC.HTML');
$attachmentLinkProvider->setUserTextInput('https://kanboard.org/folder/DOC.HTML');
$this->assertFalse($attachmentLinkProvider->match());
$attachmentLinkProvider->setUserTextInput('https://kanboard.net/folder/document.do');
$attachmentLinkProvider->setUserTextInput('https://kanboard.org/folder/document.do');
$this->assertFalse($attachmentLinkProvider->match());
}

View File

@@ -8,7 +8,7 @@ class AttachmentLinkTest extends Base
{
public function testGetTitleFromUrl()
{
$url = 'https://kanboard.net/folder/document.pdf';
$url = 'https://kanboard.org/folder/document.pdf';
$link = new AttachmentLink($this->container);
$link->setUrl($url);

View File

@@ -28,13 +28,13 @@ class WebLinkProviderTest extends Base
{
$webLinkProvider = new WebLinkProvider($this->container);
$webLinkProvider->setUserTextInput('https://kanboard.net/');
$webLinkProvider->setUserTextInput('https://kanboard.org/');
$this->assertTrue($webLinkProvider->match());
$webLinkProvider->setUserTextInput('https://kanboard.net/mypage');
$webLinkProvider->setUserTextInput('https://kanboard.org/mypage');
$this->assertTrue($webLinkProvider->match());
$webLinkProvider->setUserTextInput(' https://kanboard.net/ ');
$webLinkProvider->setUserTextInput(' https://kanboard.org/ ');
$this->assertTrue($webLinkProvider->match());
$webLinkProvider->setUserTextInput('http:// invalid url');

View File

@@ -8,7 +8,7 @@ class WebLinkTest extends Base
{
public function testGetTitleFromHtml()
{
$url = 'https://kanboard.net/something';
$url = 'https://kanboard.org/something';
$title = 'My title';
$html = '<!DOCTYPE html><html><head><title> '.$title.' </title></head><body>Test</body></html>';
@@ -27,7 +27,7 @@ class WebLinkTest extends Base
public function testGetTitleFromUrl()
{
$url = 'https://kanboard.net/something';
$url = 'https://kanboard.org/something';
$html = '<!DOCTYPE html><html><head></head><body>Test</body></html>';
$webLink = new WebLink($this->container);
@@ -40,6 +40,6 @@ class WebLinkTest extends Base
->with($url)
->will($this->returnValue($html));
$this->assertEquals('kanboard.net/something', $webLink->getTitle());
$this->assertEquals('kanboard.org/something', $webLink->getTitle());
}
}

View File

@@ -18,12 +18,12 @@ class TaskExternalLinkTest extends Base
$this->assertEquals(1, $projectModel->create(array('name' => 'Test')));
$this->assertEquals(1, $taskCreationModel->create(array('title' => 'Test', 'project_id' => 1)));
$this->assertEquals(1, $taskExternalLinkModel->create(array('task_id' => 1, 'id' => '', 'url' => 'https://kanboard.net/', 'title' => 'My website', 'link_type' => 'weblink', 'dependency' => 'related')));
$this->assertEquals(1, $taskExternalLinkModel->create(array('task_id' => 1, 'id' => '', 'url' => 'https://kanboard.org/', 'title' => 'My website', 'link_type' => 'weblink', 'dependency' => 'related')));
$link = $taskExternalLinkModel->getById(1);
$this->assertNotEmpty($link);
$this->assertEquals('My website', $link['title']);
$this->assertEquals('https://kanboard.net/', $link['url']);
$this->assertEquals('https://kanboard.org/', $link['url']);
$this->assertEquals('related', $link['dependency']);
$this->assertEquals('weblink', $link['link_type']);
$this->assertEquals(0, $link['creator_id']);
@@ -41,12 +41,12 @@ class TaskExternalLinkTest extends Base
$this->assertEquals(1, $projectModel->create(array('name' => 'Test')));
$this->assertEquals(1, $taskCreationModel->create(array('title' => 'Test', 'project_id' => 1)));
$this->assertEquals(1, $taskExternalLinkModel->create(array('task_id' => 1, 'id' => '', 'url' => 'https://kanboard.net/', 'title' => 'My website', 'link_type' => 'weblink', 'dependency' => 'related')));
$this->assertEquals(1, $taskExternalLinkModel->create(array('task_id' => 1, 'id' => '', 'url' => 'https://kanboard.org/', 'title' => 'My website', 'link_type' => 'weblink', 'dependency' => 'related')));
$link = $taskExternalLinkModel->getById(1);
$this->assertNotEmpty($link);
$this->assertEquals('My website', $link['title']);
$this->assertEquals('https://kanboard.net/', $link['url']);
$this->assertEquals('https://kanboard.org/', $link['url']);
$this->assertEquals('related', $link['dependency']);
$this->assertEquals('weblink', $link['link_type']);
$this->assertEquals(1, $link['creator_id']);
@@ -62,15 +62,15 @@ class TaskExternalLinkTest extends Base
$this->assertEquals(1, $projectModel->create(array('name' => 'Test')));
$this->assertEquals(1, $taskCreationModel->create(array('title' => 'Test', 'project_id' => 1)));
$this->assertEquals(1, $taskExternalLinkModel->create(array('task_id' => 1, 'id' => '', 'url' => 'https://kanboard.net/', 'title' => 'My website', 'link_type' => 'weblink', 'dependency' => 'related')));
$this->assertEquals(1, $taskExternalLinkModel->create(array('task_id' => 1, 'id' => '', 'url' => 'https://kanboard.org/', 'title' => 'My website', 'link_type' => 'weblink', 'dependency' => 'related')));
sleep(1);
$this->assertTrue($taskExternalLinkModel->update(array('id' => 1, 'url' => 'https://kanboard.net/')));
$this->assertTrue($taskExternalLinkModel->update(array('id' => 1, 'url' => 'https://kanboard.org/')));
$link = $taskExternalLinkModel->getById(1);
$this->assertNotEmpty($link);
$this->assertEquals('https://kanboard.net/', $link['url']);
$this->assertEquals('https://kanboard.org/', $link['url']);
$this->assertEquals(time(), $link['date_modification'], '', 2);
}
@@ -82,7 +82,7 @@ class TaskExternalLinkTest extends Base
$this->assertEquals(1, $projectModel->create(array('name' => 'Test')));
$this->assertEquals(1, $taskCreationModel->create(array('title' => 'Test', 'project_id' => 1)));
$this->assertEquals(1, $taskExternalLinkModel->create(array('task_id' => 1, 'id' => '', 'url' => 'https://kanboard.net/', 'title' => 'My website', 'link_type' => 'weblink', 'dependency' => 'related')));
$this->assertEquals(1, $taskExternalLinkModel->create(array('task_id' => 1, 'id' => '', 'url' => 'https://kanboard.org/', 'title' => 'My website', 'link_type' => 'weblink', 'dependency' => 'related')));
$this->assertTrue($taskExternalLinkModel->remove(1));
$this->assertFalse($taskExternalLinkModel->remove(1));
@@ -105,7 +105,7 @@ class TaskExternalLinkTest extends Base
$this->assertEquals(1, $projectModel->create(array('name' => 'Test')));
$this->assertEquals(1, $taskCreationModel->create(array('title' => 'Test', 'project_id' => 1)));
$this->assertEquals(1, $taskExternalLinkModel->create(array('task_id' => 1, 'url' => 'https://miniflux.net/', 'title' => 'MX', 'link_type' => 'weblink', 'dependency' => 'related')));
$this->assertEquals(2, $taskExternalLinkModel->create(array('task_id' => 1, 'url' => 'https://kanboard.net/', 'title' => 'KB', 'link_type' => 'weblink', 'dependency' => 'related')));
$this->assertEquals(2, $taskExternalLinkModel->create(array('task_id' => 1, 'url' => 'https://kanboard.org/', 'title' => 'KB', 'link_type' => 'weblink', 'dependency' => 'related')));
$links = $taskExternalLinkModel->getAll(1);
$this->assertCount(2, $links);