updated documentation, small cleanups

This commit is contained in:
El RIDO 2016-08-09 12:21:32 +02:00
parent b45bef8388
commit 3fa0881c07
4 changed files with 18 additions and 17 deletions

View file

@ -4,6 +4,7 @@ use PrivateBin\Configuration;
use PrivateBin\Data\Database;
use PrivateBin\Model;
use PrivateBin\Model\Paste;
use PrivateBin\Persistence\ServerSalt;
use PrivateBin\Vizhash16x16;
class ModelTest extends PHPUnit_Framework_TestCase
@ -12,10 +13,15 @@ class ModelTest extends PHPUnit_Framework_TestCase
private $_model;
protected $_path;
public function setUp()
{
/* Setup Routine */
Helper::confRestore();
$this->_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'privatebin_data';
if (!is_dir($this->_path)) mkdir($this->_path);
ServerSalt::setPath($this->_path);
$options = parse_ini_file(CONF, true);
$options['purge']['limit'] = 0;
$options['model'] = array(
@ -37,6 +43,8 @@ class ModelTest extends PHPUnit_Framework_TestCase
public function tearDown()
{
/* Tear Down Routine */
Helper::confRestore();
Helper::rmDir($this->_path);
}
public function testBasicWorkflow()