Reworked config class, working on unit tests

This commit is contained in:
Josh Sherman 2014-09-30 07:21:52 -04:00
parent 52c8a730f3
commit 725d952192
3 changed files with 148 additions and 222 deletions

View file

@ -2,15 +2,6 @@
require_once 'vendor/autoload.php';
$root = org\bovigo\vfs\vfsStream::setup('site');
if (!defined('SITE_PATH'))
{
define('SITE_PATH', org\bovigo\vfs\vfsStream::url('site/'));
}
require_once 'src/pickles.php';
$_SERVER['HTTP_HOST'] = 'testsite.com';
$_SERVER['SERVER_NAME'] = 'Test Server';
$_SERVER['SERVER_ADDR'] = '127.0.0.1';
@ -22,14 +13,6 @@ function setUpRequest($request, $method = 'GET')
$_REQUEST['request'] = $request;
}
function setUpConfig($config)
{
file_put_contents(
SITE_PATH . 'config.php',
'<?php $config = ' . var_export($config, true) . '; ?>'
);
}
`mysql -e 'TRUNCATE TABLE test.pickles;'`;
`mysql -e 'TRUNCATE TABLE test.mypickles;'`;
`mysql -e 'TRUNCATE TABLE test.users;'`;