|
|
|
@ -21,14 +21,14 @@ class CallTest extends \PHPUnit\Framework\TestCase |
|
|
|
|
public static $server; |
|
|
|
|
public static $port; |
|
|
|
|
|
|
|
|
|
public static function setUpBeforeClass() |
|
|
|
|
public static function setUpBeforeClass(): void |
|
|
|
|
{ |
|
|
|
|
self::$server = new Grpc\Server([]); |
|
|
|
|
self::$port = self::$server->addHttp2Port('0.0.0.0:53000'); |
|
|
|
|
self::$server->start(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function setUp() |
|
|
|
|
public function setUp(): void |
|
|
|
|
{ |
|
|
|
|
$this->channel = new Grpc\Channel('localhost:'.self::$port, [ |
|
|
|
|
'force_new' => true, |
|
|
|
@ -38,7 +38,7 @@ class CallTest extends \PHPUnit\Framework\TestCase |
|
|
|
|
Grpc\Timeval::infFuture()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function tearDown() |
|
|
|
|
public function tearDown(): void |
|
|
|
|
{ |
|
|
|
|
$this->channel->close(); |
|
|
|
|
} |
|
|
|
|