Skip to content

Commit

Permalink
* Fix tests php 5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Lutokhin committed Apr 29, 2019
1 parent f48751b commit aeed5e4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
13 changes: 13 additions & 0 deletions EmailValidator/Validation/Error/IllegalMailbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,17 @@ public function getResponseCode()
{
return $this->responseCode;
}

/**
* @return string
*/
public function __toString()
{
return sprintf(
"%s SMTP response code: %s. Internal code: %s.",
$this->message,
$this->responseCode,
$this->code
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class MailboxCheckValidationTest extends TestCase
{
public function testValidMailbox()
{
$socketHelperMock = $this->createMock(SmtpSocketHelper::class);
$socketHelperMock = $this->getMockBuilder(SmtpSocketHelper::class)
->disableOriginalConstructor()
->getMock();

$socketHelperMock
->expects($this->any())
Expand Down Expand Up @@ -42,7 +44,9 @@ public function testDNSWarnings()

public function testIllegalMailboxError()
{
$socketHelperMock = $this->createMock(SmtpSocketHelper::class);
$socketHelperMock = $this->getMockBuilder(SmtpSocketHelper::class)
->disableOriginalConstructor()
->getMock();

$socketHelperMock
->expects($this->any())
Expand Down

0 comments on commit aeed5e4

Please sign in to comment.