@@ -290,15 +290,15 @@ or extend the `Tarantool\PhpUnit\TestCase` class.
290290
291291The library provides several helper classes to create test doubles for the [ Tarantool Сlient] ( https://github.com/tarantool-php/client ) 
292292to avoid sending real requests to the Tarantool server. For the convenience of creating such objects,
293- add the trait ` ClientMocking `  to your test class:
293+ add the trait ` TestDoubleClient `  to your test class:
294294
295295``` php 
296296use PHPUnit\Framework\TestCase;
297- use Tarantool\PhpUnit\Client\ClientMocking ;
297+ use Tarantool\PhpUnit\Client\TestDoubleClient ;
298298
299299final class MyTest extends TestCase
300300{
301-  use ClientMocking ;
301+  use TestDoubleClient ;
302302
303303 // ...
304304}
@@ -314,15 +314,15 @@ A dummy client object can be created as follows:
314314``` php 
315315public function testFoo() : void
316316{
317-  $dummyClient = $this->createMockClient ();
317+  $dummyClient = $this->createDummyClient ();
318318
319319 // ...
320320}
321321``` 
322322
323323To simulate specific scenarios, such as establishing a connection to a server
324324or returning specific responses in a specific order from the server, use the facilities
325- of the ` MockClientBuilder `  class. For example, to simulate the ` PING `  request:
325+ of the ` TestDoubleClientBuilder `  class. For example, to simulate the ` PING `  request:
326326
327327``` php 
328328use Tarantool\Client\Request\PingRequest;
@@ -332,7 +332,7 @@ final class MyTest extends TestCase
332332{
333333 public function testFoo() : void
334334 {
335-  $mockClient = $this->getMockClientBuilder ()
335+  $mockClient = $this->getTestDoubleClientBuilder ()
336336 ->shouldSend(new PingRequest())
337337 ->build();
338338
@@ -347,20 +347,20 @@ Another example, sending two `EVALUATE` requests and returning a different respo
347347
348348``` php 
349349use Tarantool\Client\RequestTypes;
350- use Tarantool\PhpUnit\Client\DummyFactory ;
350+ use Tarantool\PhpUnit\Client\TestDoubleFactory ;
351351use Tarantool\PhpUnit\TestCase;
352352
353353final class MyTest extends TestCase
354354{
355355 public function testFoo() : void
356356 {
357-  $mockClient = $this->getMockClientBuilder ()
357+  $mockClient = $this->getTestDoubleClientBuilder ()
358358 ->shouldSend(
359359 RequestTypes::EVALUATE, 
360360 RequestTypes::EVALUATE
361361 )->willReceive(
362-  DummyFactory ::createResponseFromData([2]),
363-  DummyFactory ::createResponseFromData([3])
362+  TestDoubleFactory ::createResponseFromData([2]),
363+  TestDoubleFactory ::createResponseFromData([3])
364364 )->build();
365365
366366 // ...
@@ -372,11 +372,11 @@ final class MyTest extends TestCase
372372The above example can be simplified to:
373373
374374``` php 
375- $mockClient = $this->getMockClientBuilder ()
375+ $mockClient = $this->getTestDoubleClientBuilder ()
376376 ->shouldHandle(
377377 RequestTypes::EVALUATE,
378-  DummyFactory ::createResponseFromData([2]),
379-  DummyFactory ::createResponseFromData([3])
378+  TestDoubleFactory ::createResponseFromData([2]),
379+  TestDoubleFactory ::createResponseFromData([3])
380380 )->build();
381381``` 
382382
0 commit comments