/** * testStartAndEndDate * * @see 0006266: automatic deactivation of vacation message */ public function testStartAndEndDate() { $vacation = $this->_getVacation(); $vacation->setStartdate('2012-05-08'); $vacation->setEnddate('2012-05-18'); $vacation->setDateEnabled(TRUE); $script = new Expressomail_Sieve_Backend_Script(); $script->setVacation($vacation); $sieveScript = $script->getSieve(); $this->assertContains('require ["vacation","date","relational"]', $sieveScript); $this->assertContains('if allof(currentdate :value "le" "date" "2012-05-18",', $sieveScript); $this->assertContains('currentdate :value "ge" "date" "2012-05-08")', $sieveScript); }