updated .htaccess format, refactored .htaccess creation logic and improving code coverage, fixes #194

This commit is contained in:
El RIDO
2017-03-24 21:30:08 +01:00
parent 88b02d866e
commit ce92bfa934
10 changed files with 119 additions and 44 deletions

View File

@@ -1,11 +1,13 @@
<?php
use PrivateBin\Persistence\ServerSalt;
use PrivateBin\Sjcl;
class SjclTest extends PHPUnit_Framework_TestCase
{
public function testSjclValidatorValidatesCorrectly()
{
ServerSalt::setPath(sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'privatebin_data');
$paste = Helper::getPasteWithAttachment();
$this->assertTrue(Sjcl::isValid($paste['data']), 'valid sjcl');
$this->assertTrue(Sjcl::isValid($paste['attachment']), 'valid sjcl');