Exemplo n.º 1
0
 public function testUnregister()
 {
     DI::register("testScalar", 42);
     $this->assertTrue(DI::isRegistered("testScalar"));
     DI::unregister("testScalar");
     $this->assertFalse(DI::isRegistered("testScalar"));
 }
Exemplo n.º 2
0
 /**
  * Set the host and port of the endpoint
  *
  * @param string $host
  * @param integer $port
  */
 public function __construct($host = 'localhost', $port = 7474)
 {
     $this->host = $host;
     $this->port = $port;
     if (DI::isRegistered("dbPath")) {
         $this->path = DI::resolve("dbPath");
     }
 }