summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-04-21 18:55:33 +0200
committerLukas Reschke <lukas@owncloud.com>2016-04-21 19:00:27 +0200
commit830a080f0e4b67d6265ba09ab578060945f28916 (patch)
treeb45d17a98c89f132081ca333d60616ea6bf9f7fc /tests
parented746a7ec2673da124b4cdc60013feda5f3dff7f (diff)
downloadnextcloud-server-830a080f0e4b67d6265ba09ab578060945f28916.tar.gz
nextcloud-server-830a080f0e4b67d6265ba09ab578060945f28916.zip
[stable9] Ignore certificate file if it starts with file://
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/security/certificate.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/lib/security/certificate.php b/tests/lib/security/certificate.php
index 81d159ebd52..82e91c71733 100644
--- a/tests/lib/security/certificate.php
+++ b/tests/lib/security/certificate.php
@@ -50,6 +50,14 @@ class CertificateTest extends \Test\TestCase {
$certificate->getIssueDate();
}
+ /**
+ * @expectedException \Exception
+ * @expectedExceptionMessage Certificate could not get parsed.
+ */
+ function testCertificateStartingWithFileReference() {
+ new Certificate('file://'.__DIR__ . '/../../data/certificates/goodCertificate.crt', 'bar');
+ }
+
public function testGetName() {
$this->assertSame('GoodCertificate', $this->goodCertificate->getName());
$this->assertSame('BadCertificate', $this->invalidCertificate->getName());