diff --git a/tests/Mail/MailMessageTest.php b/tests/Mail/MailMessageTest.php index d5a2d90f2c40..c134159fc724 100755 --- a/tests/Mail/MailMessageTest.php +++ b/tests/Mail/MailMessageTest.php @@ -26,65 +26,65 @@ protected function setUp(): void public function testFromMethod() { - $this->assertInstanceOf(Message::class, $message = $this->message->from('foo@bar.baz', 'Foo')); - $this->assertEquals(new Address('foo@bar.baz', 'Foo'), $message->getSymfonyMessage()->getFrom()[0]); + $this->assertSame($this->message, $this->message->from('foo@bar.baz', 'Foo')); + $this->assertEquals(new Address('foo@bar.baz', 'Foo'), $this->message->getSymfonyMessage()->getFrom()[0]); } public function testSenderMethod() { - $this->assertInstanceOf(Message::class, $message = $this->message->sender('foo@bar.baz', 'Foo')); - $this->assertEquals(new Address('foo@bar.baz', 'Foo'), $message->getSymfonyMessage()->getSender()); + $this->assertSame($this->message, $this->message->sender('foo@bar.baz', 'Foo')); + $this->assertEquals(new Address('foo@bar.baz', 'Foo'), $this->message->getSymfonyMessage()->getSender()); } public function testReturnPathMethod() { - $this->assertInstanceOf(Message::class, $message = $this->message->returnPath('foo@bar.baz')); - $this->assertEquals(new Address('foo@bar.baz'), $message->getSymfonyMessage()->getReturnPath()); + $this->assertSame($this->message, $this->message->returnPath('foo@bar.baz')); + $this->assertEquals(new Address('foo@bar.baz'), $this->message->getSymfonyMessage()->getReturnPath()); } public function testToMethod() { - $this->assertInstanceOf(Message::class, $message = $this->message->to('foo@bar.baz', 'Foo')); - $this->assertEquals(new Address('foo@bar.baz', 'Foo'), $message->getSymfonyMessage()->getTo()[0]); + $this->assertSame($this->message, $this->message->to('foo@bar.baz', 'Foo')); + $this->assertEquals(new Address('foo@bar.baz', 'Foo'), $this->message->getSymfonyMessage()->getTo()[0]); - $this->assertInstanceOf(Message::class, $message = $this->message->to(['bar@bar.baz' => 'Bar'])); - $this->assertEquals(new Address('bar@bar.baz', 'Bar'), $message->getSymfonyMessage()->getTo()[0]); + $this->assertSame($this->message, $this->message->to(['bar@bar.baz' => 'Bar'])); + $this->assertEquals(new Address('bar@bar.baz', 'Bar'), $this->message->getSymfonyMessage()->getTo()[0]); } public function testToMethodWithOverride() { - $this->assertInstanceOf(Message::class, $message = $this->message->to('foo@bar.baz', 'Foo', true)); - $this->assertEquals(new Address('foo@bar.baz', 'Foo'), $message->getSymfonyMessage()->getTo()[0]); + $this->assertSame($this->message, $this->message->to('foo@bar.baz', 'Foo', true)); + $this->assertEquals(new Address('foo@bar.baz', 'Foo'), $this->message->getSymfonyMessage()->getTo()[0]); } public function testCcMethod() { - $this->assertInstanceOf(Message::class, $message = $this->message->cc('foo@bar.baz', 'Foo')); - $this->assertEquals(new Address('foo@bar.baz', 'Foo'), $message->getSymfonyMessage()->getCc()[0]); + $this->assertSame($this->message, $this->message->cc('foo@bar.baz', 'Foo')); + $this->assertEquals(new Address('foo@bar.baz', 'Foo'), $this->message->getSymfonyMessage()->getCc()[0]); } public function testBccMethod() { - $this->assertInstanceOf(Message::class, $message = $this->message->bcc('foo@bar.baz', 'Foo')); - $this->assertEquals(new Address('foo@bar.baz', 'Foo'), $message->getSymfonyMessage()->getBcc()[0]); + $this->assertSame($this->message, $this->message->bcc('foo@bar.baz', 'Foo')); + $this->assertEquals(new Address('foo@bar.baz', 'Foo'), $this->message->getSymfonyMessage()->getBcc()[0]); } public function testReplyToMethod() { - $this->assertInstanceOf(Message::class, $message = $this->message->replyTo('foo@bar.baz', 'Foo')); - $this->assertEquals(new Address('foo@bar.baz', 'Foo'), $message->getSymfonyMessage()->getReplyTo()[0]); + $this->assertSame($this->message, $this->message->replyTo('foo@bar.baz', 'Foo')); + $this->assertEquals(new Address('foo@bar.baz', 'Foo'), $this->message->getSymfonyMessage()->getReplyTo()[0]); } public function testSubjectMethod() { - $this->assertInstanceOf(Message::class, $message = $this->message->subject('foo')); - $this->assertSame('foo', $message->getSymfonyMessage()->getSubject()); + $this->assertSame($this->message, $this->message->subject('foo')); + $this->assertSame('foo', $this->message->getSymfonyMessage()->getSubject()); } public function testPriorityMethod() { - $this->assertInstanceOf(Message::class, $message = $this->message->priority(1)); - $this->assertEquals(1, $message->getSymfonyMessage()->getPriority()); + $this->assertSame($this->message, $this->message->priority(1)); + $this->assertEquals(1, $this->message->getSymfonyMessage()->getPriority()); } public function testBasicAttachment()