From 35933a62f7499ad3805bf074faca4a5ef3a28a57 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 4 Oct 2024 16:13:28 +0200 Subject: [PATCH] fix(message): Fix logic of Mail test Signed-off-by: Joas Schilling --- tests/lib/Mail/MessageTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/lib/Mail/MessageTest.php b/tests/lib/Mail/MessageTest.php index 1d309ca742dc2..2040e933b0d93 100644 --- a/tests/lib/Mail/MessageTest.php +++ b/tests/lib/Mail/MessageTest.php @@ -92,23 +92,23 @@ public function testSetRecipients(): void { $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(); }