]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(message): Fix logic of Mail test
authorJoas Schilling <coding@schilljs.com>
Fri, 4 Oct 2024 14:13:28 +0000 (16:13 +0200)
committerJoas Schilling <coding@schilljs.com>
Mon, 7 Oct 2024 10:11:38 +0000 (12:11 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
tests/lib/Mail/MessageTest.php

index 681ec03338015d6b2f26e49faa2fc31b83ccc761..260d3aaff768458de818e0a5f6903ad882bcf0d2 100644 (file)
@@ -91,23 +91,23 @@ class MessageTest extends TestCase {
                $this->symfonyEmail
                        ->expects($this->once())
                        ->method('from')
-                       ->willReturn(new Address('pierres-general-store@stardewvalley.com', 'Pierres General Store'));
+                       ->with(new Address('pierres-general-store@stardewvalley.com', 'Pierres General Store'));
                $this->symfonyEmail
                        ->expects($this->once())
                        ->method('to')
-                       ->willReturn(new Address('lewis-tent@stardewvalley.com', "Lewis' Tent Life"));
+                       ->with(new Address('lewis-tent@stardewvalley.com', "Lewis' Tent Life"));
                $this->symfonyEmail
                        ->expects($this->once())
                        ->method('replyTo')
-                       ->willReturn(new Address('penny@stardewvalley-library.co.edu', 'Penny'));
+                       ->with(new Address('penny@stardewvalley-library.co.edu', 'Penny'));
                $this->symfonyEmail
                        ->expects($this->once())
                        ->method('cc')
-                       ->willReturn(new Address('gunther@stardewvalley-library.co.edu', 'Gunther'));
+                       ->with(new Address('gunther@stardewvalley-library.co.edu', 'Gunther'));
                $this->symfonyEmail
                        ->expects($this->once())
                        ->method('bcc')
-                       ->willReturn(new Address('pam@stardewvalley-bus.com', 'Pam'));
+                       ->with(new Address('pam@stardewvalley-bus.com', 'Pam'));
 
                $this->message->setRecipients();
        }