More Unit Tests + Initializer fix

- added unit test for Router\Forms
- updated unit test for Model\Segment to reflect changes
This commit is contained in:
Jonathan Labreuille
2016-02-02 17:22:11 +01:00
parent 24ecc879d3
commit a2ef62302f
10 changed files with 213 additions and 33 deletions

View File

@ -18,13 +18,17 @@ class Initializer {
}
function init() {
$this->setupWidget();
add_action('init', array($this, 'setup'));
}
function setup() {
try {
$this->setupDB();
$this->setupRenderer();
$this->setupLocalizer();
$this->setupMenu();
$this->setupRouter();
$this->setupWidget();
$this->setupAnalytics();
$this->setupPermissions();
$this->setupChangelog();
@ -156,9 +160,7 @@ class Initializer {
}
function runQueueSupervisor() {
if(php_sapi_name() === 'cli' ||
!Env::isPluginActivated()
) return;
if(php_sapi_name() === 'cli') return;
try {
$supervisor = new Supervisor();
$supervisor->checkDaemon();