diff --git a/ingo/lib/Storage/Filters/Mock.php b/ingo/lib/Storage/Filters/Memory.php similarity index 100% rename from ingo/lib/Storage/Filters/Mock.php rename to ingo/lib/Storage/Filters/Memory.php diff --git a/ingo/lib/Storage/Forward.php b/ingo/lib/Storage/Forward.php index 3a08610ff38..c0e9f2b13e7 100644 --- a/ingo/lib/Storage/Forward.php +++ b/ingo/lib/Storage/Forward.php @@ -64,13 +64,6 @@ public function setForwardKeep($data) */ public function getForwardAddresses() { - if (is_array($this->_addr)) { - foreach ($this->_addr as $key => $val) { - if (empty($val)) { - unset($this->_addr[$key]); - } - } - } return $this->_addr; } diff --git a/ingo/test/Ingo/Stub/Storage/Mock.php b/ingo/test/Ingo/Stub/Storage/Mock.php index ebfc71a5ee3..5e20d495dc7 100644 --- a/ingo/test/Ingo/Stub/Storage/Mock.php +++ b/ingo/test/Ingo/Stub/Storage/Mock.php @@ -34,11 +34,7 @@ protected function _retrieve($field, $readonly = false) return new Ingo_Storage_Blacklist(); case self::ACTION_FILTERS: - include INGO_BASE . '/config/prefs.php'; - $ob = new Ingo_Storage_Filters_Memory( - unserialize($_prefs['rules']['value']) - ); - return $ob; + return new Ingo_Storage_Filters_Memory(); case self::ACTION_FORWARD: return new Ingo_Storage_Forward(); @@ -67,4 +63,8 @@ protected function _store($ob) $this->_data[$ob->obType()] = $ob; } + protected function _removeUserData($user) + { + } + } diff --git a/ingo/test/Ingo/Unit/ProcmailTest.php b/ingo/test/Ingo/Unit/ProcmailTest.php index 1ef7321a64b..6868c06c6e1 100644 --- a/ingo/test/Ingo/Unit/ProcmailTest.php +++ b/ingo/test/Ingo/Unit/ProcmailTest.php @@ -168,6 +168,12 @@ public function testVacationDisabled() $vacation->setVacationReason("Because I don't like working!"); $this->storage->store($vacation); + + $filters = $this->storage->retrieve(Ingo_Storage::ACTION_FILTERS); + $filters->ruleDisable( + $filters->findRuleId(Ingo_Storage::ACTION_VACATION) + ); + $this->_assertScript(''); } diff --git a/ingo/test/Ingo/Unit/SieveTest.php b/ingo/test/Ingo/Unit/SieveTest.php index 4df2ba185a0..c2f79e05a15 100644 --- a/ingo/test/Ingo/Unit/SieveTest.php +++ b/ingo/test/Ingo/Unit/SieveTest.php @@ -117,6 +117,11 @@ public function testVacationDisabled() $this->storage->store($vacation); + $filters = $this->storage->retrieve(Ingo_Storage::ACTION_FILTERS); + $filters->ruleDisable( + $filters->findRuleId(Ingo_Storage::ACTION_VACATION) + ); + $this->_assertScript(''); } @@ -145,6 +150,11 @@ public function testSpamDisabled() $this->storage->store($spam); + $filters = $this->storage->retrieve(Ingo_Storage::ACTION_FILTERS); + $filters->ruleDisable( + $filters->findRuleId(Ingo_Storage::ACTION_SPAM) + ); + $this->_assertScript(''); }