diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 15:27:18 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 15:27:18 +0100 |
commit | 3a7cf40aaa678bea1df143d2982d603b7a334eec (patch) | |
tree | 63c1e3ad7f7f401d14411a4d44c523632906afc9 /tests/lib/Security/CertificateTest.php | |
parent | 0568b012672d650c6b5a49e72c4028dde5463c60 (diff) | |
download | nextcloud-server-3a7cf40aaa678bea1df143d2982d603b7a334eec.tar.gz nextcloud-server-3a7cf40aaa678bea1df143d2982d603b7a334eec.zip |
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/Security/CertificateTest.php')
-rw-r--r-- | tests/lib/Security/CertificateTest.php | 16 |
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'); } |