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