summaryrefslogtreecommitdiffstats
path: root/tests/lib/Security/CertificateTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Security/CertificateTest.php')
-rw-r--r--tests/lib/Security/CertificateTest.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/lib/Security/CertificateTest.php b/tests/lib/Security/CertificateTest.php
index c9d6ea90bd6..986554cf967 100644
--- a/tests/lib/Security/CertificateTest.php
+++ b/tests/lib/Security/CertificateTest.php
@@ -43,20 +43,20 @@ class CertificateTest extends \Test\TestCase {
$this->expiredCertificate = new Certificate($expiredCertificate, 'ExpiredCertificate');
}
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage Certificate could not get parsed.
- */
+
public function testBogusData() {
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessage('Certificate could not get parsed.');
+
$certificate = new Certificate('foo', 'bar');
$certificate->getIssueDate();
}
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage Certificate could not get parsed.
- */
+
function testCertificateStartingWithFileReference() {
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessage('Certificate could not get parsed.');
+
new Certificate('file://'.__DIR__ . '/../../data/certificates/goodCertificate.crt', 'bar');
}