diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 00:21:27 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 00:21:27 +0300 |
commit | 2ee65f177e4f7e09ad2287f14d564e7068d322fb (patch) | |
tree | 39075e87ea7927e20e8956824cb7c49bf626b178 /tests/lib/Mail/MessageTest.php | |
parent | 3cf321fdfc4235a87015a9af2f59c63220016c65 (diff) |
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Mail/MessageTest.php')
-rw-r--r-- | tests/lib/Mail/MessageTest.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/Mail/MessageTest.php b/tests/lib/Mail/MessageTest.php index ab62cfcfdcb..14c24345069 100644 --- a/tests/lib/Mail/MessageTest.php +++ b/tests/lib/Mail/MessageTest.php @@ -80,7 +80,7 @@ class MessageTest extends TestCase { $this->swiftMessage ->expects($this->once()) ->method('getFrom') - ->will($this->returnValue($swiftresult)); + ->willReturn($swiftresult); $this->assertSame($return, $this->message->getFrom()); } @@ -117,7 +117,7 @@ class MessageTest extends TestCase { $this->swiftMessage ->expects($this->once()) ->method('getTo') - ->will($this->returnValue($swiftresult)); + ->willReturn($swiftresult); $this->assertSame($return, $this->message->getTo()); } @@ -137,7 +137,7 @@ class MessageTest extends TestCase { $this->swiftMessage ->expects($this->once()) ->method('getCc') - ->will($this->returnValue($swiftresult)); + ->willReturn($swiftresult); $this->assertSame($return, $this->message->getCc()); } @@ -157,7 +157,7 @@ class MessageTest extends TestCase { $this->swiftMessage ->expects($this->once()) ->method('getBcc') - ->will($this->returnValue($swiftresult)); + ->willReturn($swiftresult); $this->assertSame($return, $this->message->getBcc()); } @@ -175,7 +175,7 @@ class MessageTest extends TestCase { $this->swiftMessage ->expects($this->once()) ->method('getSubject') - ->will($this->returnValue('Fancy Subject')); + ->willReturn('Fancy Subject'); $this->assertSame('Fancy Subject', $this->message->getSubject()); } @@ -193,7 +193,7 @@ class MessageTest extends TestCase { $this->swiftMessage ->expects($this->once()) ->method('getBody') - ->will($this->returnValue('Fancy Body')); + ->willReturn('Fancy Body'); $this->assertSame('Fancy Body', $this->message->getPlainBody()); } |