/** * testDeleteBackendConfiguration */ public function testDeleteBackendConfiguration() { Tinebase_Auth::setBackendType(Tinebase_Auth::LDAP); $key = 'host'; Tinebase_Auth::setBackendConfiguration('configured-host', $key); $this->assertEquals('configured-host', Tinebase_Auth::getBackendConfiguration($key, 'default-host')); Tinebase_Auth::deleteBackendConfiguration($key); $this->assertEquals('default-host', Tinebase_Auth::getBackendConfiguration($key, 'default-host')); $configOptionsCount = count(Tinebase_Auth::getBackendConfiguration()); Tinebase_Auth::deleteBackendConfiguration('non-existing-key'); $this->assertEquals($configOptionsCount, count(Tinebase_Auth::getBackendConfiguration())); Tinebase_Auth::setBackendConfiguration('phpunit-dummy-value', $key); $this->assertTrue(count(Tinebase_Auth::getBackendConfiguration()) > 0); Tinebase_Auth::deleteBackendConfiguration(); $this->assertTrue(count(Tinebase_Auth::getBackendConfiguration()) == 0); }