public function isEnabled($capability = null)
{
return is_null($capability) ? $this->_enabled : in_array(Horde_String::upper($capability), $this->_enabled);
}
public function testEnable() { $c = new Horde_Imap_Client_Data_Capability_Imap(); $c->enable('FOO'); $this->assertTrue($c->isEnabled('Foo')); $c->enable('BAR=BAZ'); $this->assertTrue($c->isEnabled('bar=baz')); $c->enable('FOO', false); $this->assertFalse($c->isEnabled('foo')); }