diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-04-21 18:55:33 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-04-21 19:02:31 +0200 |
commit | 06a4da43ec9c17f47576e6376de7eb8797b343c6 (patch) | |
tree | 64c521323e1235b0d4c42ded90f614171a0dc613 /tests | |
parent | 37f6b9eaf71bdfcae26a224b282908a128ef1803 (diff) | |
download | nextcloud-server-06a4da43ec9c17f47576e6376de7eb8797b343c6.tar.gz nextcloud-server-06a4da43ec9c17f47576e6376de7eb8797b343c6.zip |
[master] Ignore certificate file if it starts with file://
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/security/certificate.php | 8 |
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()); |