Skip to content

Commit

Permalink
test: add expects() and remove assertTrue(true)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Jun 29, 2022
1 parent 204287c commit b872d7b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/system/Email/EmailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,14 @@ 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
$SMTPConnect = fopen(__FILE__, 'rb');
$this->setPrivateProperty($email, 'SMTPConnect', $SMTPConnect);

$email->__destruct();

$this->assertTrue(true);
}

private function createMockEmail(): MockEmail
Expand Down

0 comments on commit b872d7b

Please sign in to comment.