/** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. * * @return void */ protected function tearDown() { Manager::removeAllConnections(); }
/** * Test * * @test * * @return void */ public function removeAllConnectionsBoth() { Manager::addConnectionConfig('my_connection', 'sqlite', ':memory:'); Manager::getStorage("my_connection"); Manager::addDefaultConnectionConfig('sqlite', ':memory:'); Manager::getStorage(); $this->assertNotNull($GLOBALS["TickConnection:my_connection"]); $this->assertNotNull($GLOBALS["TickConnection:default"]); Manager::removeAllConnections(); $this->assertFalse(key_exists("TickConnection:my_connection", $GLOBALS)); $this->assertFalse(key_exists("TickConnection:default", $GLOBALS)); }