public function testUnregister() { DI::register("testScalar", 42); $this->assertTrue(DI::isRegistered("testScalar")); DI::unregister("testScalar"); $this->assertFalse(DI::isRegistered("testScalar")); }
/** * 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"); } }