From 26e901dfe69c29d56f5e2164d4683bab57663bb0 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 9 Oct 2016 21:17:14 -0400 Subject: Accept more file types for FileLinkProvider --- tests/units/ExternalLink/FileLinkProviderTest.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests') diff --git a/tests/units/ExternalLink/FileLinkProviderTest.php b/tests/units/ExternalLink/FileLinkProviderTest.php index 8cef82f8..8698e174 100644 --- a/tests/units/ExternalLink/FileLinkProviderTest.php +++ b/tests/units/ExternalLink/FileLinkProviderTest.php @@ -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()); } -- cgit v1.2.3