Accept more file types for FileLinkProvider

This commit is contained in:
Frederic Guillot
2016-10-09 21:17:14 -04:00
parent 9302ff82f3
commit 26e901dfe6
3 changed files with 39 additions and 3 deletions

View File

@@ -31,6 +31,21 @@ class FileLinkProviderTest extends Base
$attachmentLinkProvider->setUserTextInput('file:///tmp/test.txt');
$this->assertTrue($attachmentLinkProvider->match());
$attachmentLinkProvider->setUserTextInput('owncloud:///tmp/test.txt');
$this->assertTrue($attachmentLinkProvider->match());
$attachmentLinkProvider->setUserTextInput('notebooks:///tmp/test.txt');
$this->assertTrue($attachmentLinkProvider->match());
$attachmentLinkProvider->setUserTextInput('http://google.com/');
$this->assertFalse($attachmentLinkProvider->match());
$attachmentLinkProvider->setUserTextInput('https://google.com/');
$this->assertFalse($attachmentLinkProvider->match());
$attachmentLinkProvider->setUserTextInput('ftp://google.com/');
$this->assertFalse($attachmentLinkProvider->match());
$attachmentLinkProvider->setUserTextInput('');
$this->assertFalse($attachmentLinkProvider->match());
}