public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     Module::registerModule(new UnitTestExceptionModule());
     Module::initialiseModules();
     Log::clearLogs();
     Log::attachLog(self::$log = new UnitTestLog(Log::ERROR_LEVEL));
     ExceptionHandler::enableExceptionTrapping();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->application = new Application();
     $this->application->registerModule(new UnitTestingModule());
     $this->application->registerModule(new UnitTestExceptionModule());
     $this->application->initialiseModules();
     Log::clearLogs();
     Log::attachLog(self::$log = new UnitTestLog(Log::ERROR_LEVEL));
     ExceptionHandler::enableExceptionTrapping();
 }
 protected function setUp()
 {
     parent::setUp();
     Log::clearLogs();
     Log::attachLog($this->log = new UnitTestIndentedMessageLog(Log::DEBUG_LEVEL));
 }
<?php

namespace Your\WebApp;

use Rhubarb\Crown\Context;
use Rhubarb\Crown\Exceptions\Handlers\ExceptionHandler;
use Rhubarb\Crown\Logging\Log;
use Rhubarb\Crown\Logging\PhpLog;
use Rhubarb\Stem\StemSettings;
$dbSettings = new StemSettings();
$dbSettings->Host = "localhost";
$dbSettings->Username = "******";
$dbSettings->Password = "";
$dbSettings->Database = "ogredb";
// Add a PHP logger
Log::attachLog(new PhpLog(Log::ALL));
$con = new Context();
$con->DeveloperMode = true;
// Switch off exception trapping. You should have this on in the production environment.
ExceptionHandler::disableExceptionTrapping();
Beispiel #5
0
<?php

namespace Project\Liberty;

use Rhubarb\Crown\Context;
use Rhubarb\Crown\Exceptions\Handlers\ExceptionHandler;
use Rhubarb\Crown\Logging\Log;
use Rhubarb\Crown\Logging\PhpLog;
use Rhubarb\Stem\StemSettings;
$dbSettings = new StemSettings();
$dbSettings->Host = "localhost";
$dbSettings->Username = "******";
$dbSettings->Password = "";
$dbSettings->Database = "vagrant";
$set = new Context();
$set->DeveloperMode = true;
// Add a PHP logger
Log::attachLog(new PhpLog(Log::ERROR_LEVEL));
ExceptionHandler::disableExceptionTrapping();
Beispiel #6
0
 protected function setUp()
 {
     parent::setUp();
     Log::clearLogs();
     Log::attachLog($this->log = new UnitTestLog(Log::ERROR_LEVEL));
 }