From b872d7b364c17fa4afdb1e3044c9585654ee0ee2 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sat, 25 Jun 2022 05:42:27 +0900 Subject: [PATCH] test: add expects() and remove assertTrue(true) --- tests/system/Email/EmailTest.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/system/Email/EmailTest.php b/tests/system/Email/EmailTest.php index 2fa0030f4fdd..da428519071d 100644 --- a/tests/system/Email/EmailTest.php +++ b/tests/system/Email/EmailTest.php @@ -143,7 +143,7 @@ public function testDestructDoesNotThrowException() ->disableOriginalConstructor() ->onlyMethods(['sendCommand']) ->getMock(); - $email->method('sendCommand') + $email->expects($this->once())->method('sendCommand') ->willThrowException(new ErrorException('SMTP Error.')); // Force resource to be injected into the property @@ -151,8 +151,6 @@ public function testDestructDoesNotThrowException() $this->setPrivateProperty($email, 'SMTPConnect', $SMTPConnect); $email->__destruct(); - - $this->assertTrue(true); } private function createMockEmail(): MockEmail