diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-04-15 16:20:05 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-04-20 13:00:02 +0200 |
commit | 21f0476d3179f7f9b9085f02404f79c392520bc3 (patch) | |
tree | 69a35e0774ae3a465628e9b745f83cc7d8147883 | |
parent | 1cc2aefa46a2db29b7bfb8c70fe3c9928d86da25 (diff) | |
download | nextcloud-server-21f0476d3179f7f9b9085f02404f79c392520bc3.tar.gz nextcloud-server-21f0476d3179f7f9b9085f02404f79c392520bc3.zip |
Fix files
-rw-r--r-- | tests/lib/security/certificatemanager.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/lib/security/certificatemanager.php b/tests/lib/security/certificatemanager.php index 1167fe3d868..aea1fb71bc5 100644 --- a/tests/lib/security/certificatemanager.php +++ b/tests/lib/security/certificatemanager.php @@ -67,9 +67,13 @@ class CertificateManagerTest extends \Test\TestCase { $this->certificateManager->addCertificate('InvalidCertificate', 'invalidCertificate'); } + /** + * @expectedException \Exception + * @expectedExceptionMessage Filename is not valid + */ function testAddDangerousFile() { - $this->assertFalse($this->certificateManager->addCertificate(file_get_contents(__DIR__.'/../../data/certificates/expiredCertificate.crt'), '.htaccess')); - $this->assertFalse($this->certificateManager->addCertificate(file_get_contents(__DIR__.'/../../data/certificates/expiredCertificate.crt'), '../../foo.txt')); + $this->certificateManager->addCertificate(file_get_contents(__DIR__.'/../../data/certificates/expiredCertificate.crt'), '.htaccess'); + $this->certificateManager->addCertificate(file_get_contents(__DIR__.'/../../data/certificates/expiredCertificate.crt'), '../../foo.txt'); } function testRemoveDangerousFile() { |