-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert(Felamimail/js): support sieve forwarding
- Loading branch information
1 parent
5b29acf
commit bf92602
Showing
19 changed files
with
41 additions
and
476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -442,24 +442,10 @@ public function testSaveEmailAccountWithSieveScript() | |
|
||
$account->sieve_rules = []; | ||
$account->sieve_vacation = $vacationData; | ||
$account->sieve_forwardings = new Tinebase_Record_RecordSet(Felamimail_Model_Sieve_Forward::class, [ | ||
[ | ||
'account_id' => $account->getId(), | ||
'email' => '[email protected]', | ||
'id' => Tinebase_Record_Abstract::generateUID(), | ||
], [ | ||
'account_id' => $account->getId(), | ||
'email' => '[email protected]', | ||
'id' => Tinebase_Record_Abstract::generateUID(), | ||
] | ||
]); | ||
|
||
$this->_json->saveEmailAccount($account->toArray()); | ||
$script = $this->_json->getSieveScript($account->getId()); | ||
$this->assertStringContainsString('currentdate', $script); | ||
$this->assertStringContainsString('[email protected]', $script); | ||
$this->assertStringContainsString('[email protected]', $script); | ||
|
||
|
||
$account->sieve_rules = $this->_getSieveRuleData(); | ||
$this->_json->saveEmailAccount($account->toArray()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,25 +138,6 @@ public function testAutoReplyAction() | |
$this->assertStringContainsString('Felamimail_Sieve_Rule', $sieveScript); | ||
} | ||
|
||
|
||
public function testForwarding() | ||
{ | ||
$script = new Felamimail_Sieve_Backend_Script(); | ||
$forward = new Felamimail_Sieve_Forward(); | ||
|
||
$testEmails = [ | ||
'[email protected]', | ||
'[email protected]', | ||
]; | ||
$forward->setAddresses($testEmails); | ||
$script->setForward($forward); | ||
$sieveScript = $script->getSieve(); | ||
$this->assertStringContainsString('require ["envelope", "copy", "reject", "editheader", "variables"]', $sieveScript, | ||
'editheader extension is required in script: ' . $sieveScript); | ||
$this->assertStringContainsString('[email protected]', $sieveScript); | ||
$this->assertStringContainsString('[email protected]', $sieveScript); | ||
} | ||
|
||
public function testInvalidRule() | ||
{ | ||
$script = new Felamimail_Sieve_Backend_Script(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.