public function testVacationEnabled() { $vacation = new Ingo_Rule_System_Vacation(); $vacation->addAddresses('*****@*****.**'); $vacation->disable = false; $vacation->subject = 'Subject'; $vacation->reason = "Because I don't like working!"; $this->storage->updateRule($vacation); $this->_assertScript(':0 { :0 * ^TO_from@example.com { FILEDATE=`test -f ${VACATION_DIR:-.}/\'.vacation.from@example.com\' && ls -lcn --time-style=+%s ${VACATION_DIR:-.}/\'.vacation.from@example.com\' | awk \'{ print $6 + (604800) }\'` DATE=`date +%s` DUMMY=`test -f ${VACATION_DIR:-.}/\'.vacation.from@example.com\' && test $FILEDATE -le $DATE && rm ${VACATION_DIR:-.}/\'.vacation.from@example.com\'` :0 h SUBJECT=| formail -xSubject: :0 Whc: ${VACATION_DIR:-.}/vacation.lock { :0 Wh * ^TO_from@example.com * !^X-Loop: from@example.com * !^X-Spam-Flag: YES * !^FROM_DAEMON | formail -rD 8192 ${VACATION_DIR:-.}/.vacation.from@example.com :0 eh | (formail -rI"Precedence: junk" \\ -a"From: <*****@*****.**>" \\ -A"X-Loop: from@example.com" \\ -i"Subject: Subject (Re: $SUBJECT)" ; \\ echo -e "Because I don\'t like working!" \\ ) | $SENDMAIL -ffrom@example.com -oi -t } } }'); }
public function testVacationEnabled() { $vacation = new Ingo_Rule_System_Vacation(); $vacation->addAddresses('*****@*****.**'); $vacation->disable = false; $vacation->subject = 'Subject'; $vacation->reason = "Because I don't like working!"; $this->storage->updateRule($vacation); $this->_assertScript('require ["vacation", "regex"]; if allof ( not exists "list-help", not exists "list-unsubscribe", not exists "list-subscribe", not exists "list-owner", not exists "list-post", not exists "list-archive", not exists "list-id", not exists "Mailing-List", not header :comparator "i;ascii-casemap" :is "Precedence" ["list", "bulk", "junk"], not header :comparator "i;ascii-casemap" :matches "To" "Multiple recipients of*" ) { vacation :days 7 :addresses "*****@*****.**" :subject "Subject" "Because I don\'t like working!"; }'); }