Skip to content

Commit b872d7b

Browse files
committed
test: add expects() and remove assertTrue(true)
1 parent 204287c commit b872d7b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/system/Email/EmailTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,14 @@ public function testDestructDoesNotThrowException()
143143
->disableOriginalConstructor()
144144
->onlyMethods(['sendCommand'])
145145
->getMock();
146-
$email->method('sendCommand')
146+
$email->expects($this->once())->method('sendCommand')
147147
->willThrowException(new ErrorException('SMTP Error.'));
148148

149149
// Force resource to be injected into the property
150150
$SMTPConnect = fopen(__FILE__, 'rb');
151151
$this->setPrivateProperty($email, 'SMTPConnect', $SMTPConnect);
152152

153153
$email->__destruct();
154-
155-
$this->assertTrue(true);
156154
}
157155

158156
private function createMockEmail(): MockEmail

0 commit comments

Comments
 (0)