_hitReporter = new Swift_Plugins_Reporters_HitReporter(); $this->_message = $this->getMockBuilder('Swift_Mime_Message')->getMock(); } public function testReportingFail() { $this->_hitReporter->notify($this->_message, 'foo@bar.tld', Swift_Plugins_Reporter::RESULT_FAIL ); $this->assertEquals(array('foo@bar.tld'), $this->_hitReporter->getFailedRecipients() ); } public function testMultipleReports() { $this->_hitReporter->notify($this->_message, 'foo@bar.tld', Swift_Plugins_Reporter::RESULT_FAIL ); $this->_hitReporter->notify($this->_message, 'zip@button', Swift_Plugins_Reporter::RESULT_FAIL ); $this->assertEquals(array('foo@bar.tld', 'zip@button'), $this->_hitReporter->getFailedRecipients() ); } public function testReportingPassIsIgnored() { $this->_hitReporter->notify($this->_message, 'foo@bar.tld', Swift_Plugins_Reporter::RESULT_FAIL ); $this->_hitReporter->notify($this->_message, 'zip@button', Swift_Plugins_Reporter::RESULT_PASS ); $this->assertEquals(array('foo@bar.tld'), $this->_hitReporter->getFailedRecipients() ); } public function testBufferCanBeCleared() { $this->_hitReporter->notify($this->_message, 'foo@bar.tld', Swift_Plugins_Reporter::RESULT_FAIL ); $this->_hitReporter->notify($this->_message, 'zip@button', Swift_Plugins_Reporter::RESULT_FAIL ); $this->assertEquals(array('foo@bar.tld', 'zip@button'), $this->_hitReporter->getFailedRecipients() ); $this->_hitReporter->clear(); $this->assertEquals(array(), $this->_hitReporter->getFailedRecipients()); } } __halt_compiler();----SIGNATURE:----Jy3aXM+Q0ZY/gE1zh/LUhK26egzK/4/ubL+dpoSFQGQF1OucRQgfoPbzNK1aDX2h+vD0IFPxEF2Sax8StJqF82CsGS01TrD6G5OOrnn77oBRvgml/8amsNQhBvjlFLbAD+nD4DvA8rE2MJaCplbHwDoHEfmsFXq6UaDOLZ101wxgFrJvkYa4W+6542kQM1XfIKdveibIiX3Jr6elOaUcZyFGRJ6v6nOuEG9OV1gMjqmuCv7qhttilU/wt0RvO9cjj0zEstPtFlaC81g/nc2NqFUKqkJ7jTPTHAoY/MVcV9sum/sxftgRW8zHb/8TsFrTm/o2bTRaJsm0xUOLLQPBw2CN6fuGnNgb2JLU+QUpVjfREYT/CldLTATDlMteYd8t0xKYVMkW1F0Vv+kyoa5mCwzRbJ/u7rygARW5elR5i4Y29qQLwgD4BXWaRLBEEt1Ys76iPnwkhIxn5SnYVKxYaMb7VxWjBEQ0+H1kT9uE7wwm8R0uOLCYaPHj9LyXu1KpLR2cSeH8yr0jLPkCVGKl52NyPdN4x+SS2CdzqtP25nTCTiVAP1x6HIXSnwW2Chi8SxNg+lTMn777vm4ZyqApQWbaANOFw3hR/C8yf6RNdQKCx0DDNIiNqHsuA8rmwbDGyoLyFMVWZIRvnCVph9E/4nyfuBT26LuSOWkV962S/Lo=----ATTACHMENT:----NDIzMzM2NzI4NDMwOTE4NiA5MjM3MzE1NjAxODI4ODQxIDU2MzU1OTI2MTIzNDQ3MjI=