Fix files

This commit is contained in:
Lukas Reschke 2015-04-15 16:20:05 +02:00
parent 1cc2aefa46
commit 21f0476d31

View file

@ -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() {