예제 #1
0
파일: Runner.php 프로젝트: reoring/sabel
 public function testHas()
 {
     $bus = Sabel_Bus::create();
     $bus->set("a", "10");
     $bus->set("b", "20");
     $bus->set("c", "30");
     $this->assertTrue($bus->has("a"));
     $this->assertFalse($bus->has("d"));
     $this->assertTrue($bus->has(array("a", "b", "c")));
     $this->assertFalse($bus->has(array("a", "d", "c")));
 }
예제 #2
0
<?php

ob_start();
define("RUN_BASE", dirname(realpath(".")));
//require ("Sabel"  . DIRECTORY_SEPARATOR . "Sabel.php");
require RUN_BASE . DIRECTORY_SEPARATOR . "Sabel" . DIRECTORY_SEPARATOR . "Sabel.php";
require RUN_BASE . DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . "INIT.php";
require RUN_BASE . DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . "environment.php";
if (!defined("ENVIRONMENT")) {
    echo "SABEL FATAL ERROR: must define ENVIRONMENT in config/environment.php";
    exit;
}
if ((ENVIRONMENT & PRODUCTION) > 0) {
    Sabel::init();
    echo Sabel_Bus::create()->run(new Config_Bus());
    Sabel::shutdown();
} else {
    echo Sabel_Bus::create()->run(new Config_Bus());
}
ob_flush();