Skip to content

Commit

Permalink
Simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
msmakouz committed Jun 27, 2024
1 parent 8852269 commit 40867d7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/Goridge/RPCTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Exception;
use PHPUnit\Framework\TestCase;
use Spiral\Goridge\Frame;
use Spiral\Goridge\Relay;
use Spiral\Goridge\RelayInterface;
use Spiral\Goridge\RPC\Codec\RawCodec;
use Spiral\Goridge\RPC\Exception\CodecException;
Expand Down Expand Up @@ -157,7 +156,7 @@ public function testLongRawBody(): void
{
$conn = $this->makeRPC();
$payload = random_bytes(65000 * 1000);

$resp = $conn->withCodec(new RawCodec())->call(
'Service.EchoBinary',
$payload
Expand Down Expand Up @@ -255,7 +254,7 @@ public function testJsonException(): void
*/
public function testCallSequence(): void
{
$relay1 = $this->getMockBuilder(Relay::class)->onlyMethods(['waitFrame', 'send'])->getMock();
$relay1 = $this->createMock(RelayInterface::class);
$relay1
->method('waitFrame')
->willReturnOnConsecutiveCalls(
Expand All @@ -271,7 +270,7 @@ public function testCallSequence(): void
[new Frame('Service.Process{"Name":"foo","Value":18}', [3, 15], 8)]
);

$relay2 = $this->getMockBuilder(Relay::class)->onlyMethods(['waitFrame', 'send'])->getMock();
$relay2 = $this->createMock(RelayInterface::class);
$relay2
->method('waitFrame')
->willReturnOnConsecutiveCalls(
Expand Down

0 comments on commit 40867d7

Please sign in to comment.