Exemplo n.º 1
0
 /**
  * @dataProvider dataProviderTestParser
  */
 public function testParser($expectedBounce, $expectedAuthCode, $message, $filename)
 {
     $emailSource = file_get_contents($filename);
     $parser = new EmailParser();
     $parser->parse($emailSource);
     $this->assertSame($expectedBounce, $parser->getBounceLevel(), 'Bounce level should be ' . var_export($expectedBounce, true) . ' for ' . $message);
     $this->assertSame($expectedAuthCode, $parser->getAuthCode(), 'AuthCode should be ' . var_export($expectedAuthCode, true) . ' for ' . $message);
 }
Exemplo n.º 2
0
 /**
  * Constructor for bounce handler
  * @param string $mailsource
  */
 public function __construct($mailsource = '')
 {
     $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
     $this->emailParser = new EmailParser();
     $this->emailParser->parse($mailsource);
 }