Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oqq committed Dec 19, 2023
1 parent 045e126 commit cdba11b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/MailHogTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Codeception\Module\MailHog;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Psr7\Utils;
use PHPUnit\Framework\AssertionFailedError;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
Expand Down Expand Up @@ -62,7 +63,7 @@ public function testFetchEmailsPositive(): void
->getMock();
$response->expects(self::atLeastOnce())
->method('getBody')
->willReturn(self::$jsonEmail);
->willReturn(Utils::streamFor(self::$jsonEmail));

/** @var MockObject&ClientInterface $client */
$client = $this->getMockBuilder(Client::class)
Expand Down Expand Up @@ -271,7 +272,7 @@ public function testOpenNextUnreadEmailPositive(): void
->getMock();
$response->expects(self::atLeastOnce())
->method('getBody')
->willReturn(self::$jsonEmail);
->willReturn(Utils::streamFor(self::$jsonEmail));

/** @var MockObject&ClientInterface $client */
$client = $this->getMockBuilder(Client::class)
Expand Down

0 comments on commit cdba11b

Please sign in to comment.