aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/tests/generated_code/AbstractGeneratedCodeTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/php/tests/generated_code/AbstractGeneratedCodeTest.php')
-rw-r--r--src/php/tests/generated_code/AbstractGeneratedCodeTest.php38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/php/tests/generated_code/AbstractGeneratedCodeTest.php b/src/php/tests/generated_code/AbstractGeneratedCodeTest.php
index 8fe9bc26d8..29dbe1975c 100644
--- a/src/php/tests/generated_code/AbstractGeneratedCodeTest.php
+++ b/src/php/tests/generated_code/AbstractGeneratedCodeTest.php
@@ -32,8 +32,8 @@
*
*/
require_once realpath(dirname(__FILE__).'/../../vendor/autoload.php');
-require_once dirname(__FILE__).'/math.pb.php';
-require_once dirname(__FILE__).'/math_grpc_pb.php';
+@include_once dirname(__FILE__).'/math.pb.php';
+@include_once dirname(__FILE__).'/math_grpc_pb.php';
abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
{
@@ -70,7 +70,7 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
public function testClose()
{
self::$client->close();
- $div_arg = new math\DivArgs();
+ $div_arg = new Math\DivArgs();
$call = self::$client->Div($div_arg);
}
@@ -79,20 +79,20 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
*/
public function testInvalidMetadata()
{
- $div_arg = new math\DivArgs();
+ $div_arg = new Math\DivArgs();
$call = self::$client->Div($div_arg, [' ' => 'abc123']);
}
public function testGetCallMetadata()
{
- $div_arg = new math\DivArgs();
+ $div_arg = new Math\DivArgs();
$call = self::$client->Div($div_arg);
$this->assertTrue(is_array($call->getMetadata()));
}
public function testTimeout()
{
- $div_arg = new math\DivArgs();
+ $div_arg = new Math\DivArgs();
$call = self::$client->Div($div_arg, [], ['timeout' => 1]);
list($response, $status) = $call->wait();
$this->assertSame(\Grpc\STATUS_DEADLINE_EXCEEDED, $status->code);
@@ -100,7 +100,7 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
public function testCancel()
{
- $div_arg = new math\DivArgs();
+ $div_arg = new Math\DivArgs();
$call = self::$client->Div($div_arg);
$call->cancel();
list($response, $status) = $call->wait();
@@ -109,7 +109,7 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
public function testCallCredentialsCallback()
{
- $div_arg = new math\DivArgs();
+ $div_arg = new Math\DivArgs();
$call = self::$client->Div($div_arg, array(), array(
'call_credentials_callback' => function ($context) {
return array();
@@ -122,7 +122,7 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
public function testCallCredentialsCallback2()
{
- $div_arg = new math\DivArgs();
+ $div_arg = new Math\DivArgs();
$call = self::$client->Div($div_arg);
$call_credentials = Grpc\CallCredentials::createFromPlugin(
function ($context) {
@@ -143,7 +143,7 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
$invalid_client = new DummyInvalidClient('host', [
'credentials' => Grpc\ChannelCredentials::createInsecure(),
]);
- $div_arg = new math\DivArgs();
+ $div_arg = new Math\DivArgs();
$invalid_client->InvalidUnaryCall($div_arg);
}
@@ -166,7 +166,7 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
public function testWriteFlags()
{
- $div_arg = new math\DivArgs();
+ $div_arg = new Math\DivArgs();
$div_arg->setDividend(7);
$div_arg->setDivisor(4);
$call = self::$client->Div($div_arg, [],
@@ -180,7 +180,7 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
public function testWriteFlagsServerStreaming()
{
- $fib_arg = new math\FibArgs();
+ $fib_arg = new Math\FibArgs();
$fib_arg->setLimit(7);
$call = self::$client->Fib($fib_arg, [],
['flags' => Grpc\WRITE_NO_COMPRESS]);
@@ -192,7 +192,7 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
public function testWriteFlagsClientStreaming()
{
$call = self::$client->Sum();
- $num = new math\Num();
+ $num = new Math\Num();
$num->setNum(1);
$call->write($num, ['flags' => Grpc\WRITE_NO_COMPRESS]);
list($response, $status) = $call->wait();
@@ -202,7 +202,7 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
public function testWriteFlagsBidiStreaming()
{
$call = self::$client->DivMany();
- $div_arg = new math\DivArgs();
+ $div_arg = new Math\DivArgs();
$div_arg->setDividend(7);
$div_arg->setDivisor(4);
$call->write($div_arg, ['flags' => Grpc\WRITE_NO_COMPRESS]);
@@ -214,7 +214,7 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
public function testSimpleRequest()
{
- $div_arg = new math\DivArgs();
+ $div_arg = new Math\DivArgs();
$div_arg->setDividend(7);
$div_arg->setDivisor(4);
$call = self::$client->Div($div_arg);
@@ -227,7 +227,7 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
public function testServerStreaming()
{
- $fib_arg = new math\FibArgs();
+ $fib_arg = new Math\FibArgs();
$fib_arg->setLimit(7);
$call = self::$client->Fib($fib_arg);
$this->assertTrue(is_string($call->getPeer()));
@@ -246,7 +246,7 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
$call = self::$client->Sum();
$this->assertTrue(is_string($call->getPeer()));
for ($i = 0; $i < 7; ++$i) {
- $num = new math\Num();
+ $num = new Math\Num();
$num->setNum($i);
$call->write($num);
}
@@ -260,7 +260,7 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
$call = self::$client->DivMany();
$this->assertTrue(is_string($call->getPeer()));
for ($i = 0; $i < 7; ++$i) {
- $div_arg = new math\DivArgs();
+ $div_arg = new Math\DivArgs();
$div_arg->setDividend(2 * $i + 1);
$div_arg->setDivisor(2);
$call->write($div_arg);
@@ -276,7 +276,7 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
class DummyInvalidClient extends \Grpc\BaseStub
{
- public function InvalidUnaryCall(\math\DivArgs $argument,
+ public function InvalidUnaryCall(\Math\DivArgs $argument,
$metadata = [],
$options = [])
{