[TASK] Avoid sysLog calls in MailUtilityTest 92/29192/2
authorMarkus Klein <klein.t3@mfc-linz.at>
Sat, 5 Apr 2014 17:10:08 +0000 (19:10 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 5 Apr 2014 20:21:21 +0000 (22:21 +0200)
Resolves: #57676
Releases: 6.2
Change-Id: I6f694a2c595756595b09aa4a8a91cb795e8a47b7
Reviewed-on: https://review.typo3.org/29192
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Oliver Klee
Reviewed-by: Pascal Dürsteler
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Tests/Unit/Utility/MailUtilityTest.php

index 5031f1a..77d6076 100644 (file)
@@ -83,7 +83,10 @@ class MailUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $mockMailer = $this->getMock('TYPO3\\CMS\\Core\\Mail\\MailerAdapterInterface', array('mail'));
                $mockClassName = get_class($mockMailer);
                \TYPO3\CMS\Core\Utility\GeneralUtility::addInstance($mockClassName, $mockMailer);
-               $mockMailer->expects($this->once())->method('mail')->with($to, $subject, $messageBody, $additionalHeadersExpected, $additionalParameters, $fakeThis);
+               $mockMailer->expects($this->once())
+                       ->method('mail')
+                       ->with($to, $subject, $messageBody, $additionalHeadersExpected, $additionalParameters, $fakeThis)
+                       ->will($this->returnValue(TRUE));
                $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery'] = array($mockClassName);
                \TYPO3\CMS\Core\Utility\MailUtility::mail($to, $subject, $messageBody, $additionalHeaders, $additionalParameters);
                // Restore configuration