예제 #1
0
 public function setUp()
 {
     ini_set('display_errors', 'on');
     date_default_timezone_set('Europe/Berlin');
     $this->clearLog();
     if (!$this->connected) {
         $this->connect();
     }
     $util = new LudoDBUtility();
     $tables = array('TestNode', 'LeafNode', 'TestTable', 'Person', 'Phone', 'City');
     $util->dropAndCreate($tables);
 }
예제 #2
0
 public function setUp()
 {
     if (!self::$connected) {
         date_default_timezone_set('Europe/Berlin');
         LudoDB::setHost('localhost');
         LudoDB::setUser('root');
         LudoDB::setPassword('administrator');
         LudoDB::setDb('PHPUnit');
         self::$connected = true;
         LudoDBRegistry::set('FILE_UPLOAD_PATH', '/tmp/');
     }
     if (!self::$logCleared) {
         self::$logCleared = true;
         $this->clearLog();
     }
     $classes = array('Game', 'Move', 'Database', 'Folder', 'Metadata', 'MetadataValue', 'Session', 'Seek', 'Chat', 'ChatMessage', 'ChatMessages', 'Fen', 'Player', 'TimeControl', 'ChessFileUpload', 'Elo', 'PasswordLookup');
     $util = new LudoDBUtility();
     $util->dropAndCreate($classes);
     $this->createAdminUserAndSignIn();
 }
예제 #3
0
<?php

/**
 * Demo of nested collections. DemoCountries merges DemoStates
 * and DemoStates merges DemoCities.
 * User: Alf Magne Kalleland
 * Date: 09.02.13
 * Time: 16:34
 */
require_once __DIR__ . "/autoload.php";
ini_set('display_errors', 'on');
date_default_timezone_set("Europe/Berlin");
LudoDB::setDb("PHPUnit");
LudoDB::setUser("root");
LudoDB::setPassword("administrator");
LudoDB::setHost("127.0.0.1");
$c = new DemoCountry();
if (!$c->exists()) {
    $util = new LudoDBUtility();
    $util->dropAndCreate(array("DemoState", "DemoCity", "DemoCountry"));
}
LudoDB::enableLogging();
// get number of queries and server time in response
$handler = new LudoDBRequestHandler();
echo $handler->handle("DemoCountries/read");
예제 #4
0
 public function setUp()
 {
     parent::setUp();
     $util = new LudoDBUtility();
     $util->dropAndCreate(array("TLudoJSPerson", "TLudoJSCountry"));
 }
 public function setUp()
 {
     parent::setUp();
     $util = new LudoDBUtility();
     $util->dropAndCreate(array('PersonWithValidation'));
 }
예제 #6
0
 public function database()
 {
     $util = new LudoDBUtility();
     return $util->getDatabaseCreate($this->classes);
 }
 public function getClassesRearranged($classNames)
 {
     return parent::getClassesRearranged($classNames);
 }