php: ran php-cs-fixer again

pull/6212/head
Stanley Cheung 9 years ago
parent 279681311f
commit 7f05da6a27
  1. 2
      src/php/tests/bootstrap.php
  2. 3
      src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php
  3. 4
      src/php/tests/generated_code/math_client.php
  4. 1
      src/php/tests/unit_tests/CallCredentials3Test.php
  5. 3
      src/php/tests/unit_tests/CallTest.php
  6. 2
      src/php/tests/unit_tests/ChannelCredentialsTest.php
  7. 3
      src/php/tests/unit_tests/ChannelTest.php
  8. 8
      src/php/tests/unit_tests/EndToEndTest.php
  9. 3
      src/php/tests/unit_tests/ServerTest.php
  10. 15
      src/php/tests/unit_tests/TimevalTest.php

@ -17,5 +17,5 @@
*/ */
error_reporting(E_ALL | E_STRICT); error_reporting(E_ALL | E_STRICT);
require dirname(__DIR__) . '/vendor/autoload.php'; require dirname(__DIR__).'/vendor/autoload.php';
date_default_timezone_set('UTC'); date_default_timezone_set('UTC');

@ -46,7 +46,8 @@ class GeneratedCodeWithCallbackTest extends AbstractGeneratedCodeTest
$a_copy['foo'] = ['bar']; $a_copy['foo'] = ['bar'];
return $a_copy; return $a_copy;
}]); },
]);
} }
public function tearDown() public function tearDown()

@ -38,13 +38,13 @@ include 'tests/generated_code/math.php';
function p($line) function p($line)
{ {
print("$line<br/>\n"); echo "$line<br/>\n";
} }
$host = 'localhost:50051'; $host = 'localhost:50051';
p("Connecting to host: $host"); p("Connecting to host: $host");
$client = new math\MathClient($host, [ $client = new math\MathClient($host, [
'credentials' => Grpc\ChannelCredentials::createInsecure() 'credentials' => Grpc\ChannelCredentials::createInsecure(),
]); ]);
p('Client class: '.get_class($client)); p('Client class: '.get_class($client));
p(''); p('');

@ -132,5 +132,4 @@ class CallCredentials3Test extends PHPUnit_Framework_TestCase
unset($call); unset($call);
unset($server_call); unset($server_call);
} }
} }

@ -94,7 +94,7 @@ class CallTest extends PHPUnit_Framework_TestCase
public function testCancel() public function testCancel()
{ {
$this->assertNull($this->call->cancel()); $this->assertNull($this->call->cancel());
} }
/** /**
@ -118,5 +118,4 @@ class CallTest extends PHPUnit_Framework_TestCase
]; ];
$result = $this->call->startBatch($batch); $result = $this->call->startBatch($batch);
} }
} }

@ -70,4 +70,4 @@ class ChanellCredentialsTest extends PHPUnit_Framework_TestCase
$channel_credentials = Grpc\ChannelCredentials::createInsecure(); $channel_credentials = Grpc\ChannelCredentials::createInsecure();
$this->assertNull($channel_credentials); $this->assertNull($channel_credentials);
} }
} }

@ -78,5 +78,4 @@ class ChannelTest extends PHPUnit_Framework_TestCase
] ]
); );
} }
}
}

@ -261,7 +261,8 @@ class EndToEndTest extends PHPUnit_Framework_TestCase
Grpc\OP_SEND_INITIAL_METADATA => [], Grpc\OP_SEND_INITIAL_METADATA => [],
Grpc\OP_SEND_CLOSE_FROM_CLIENT => true, Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
Grpc\OP_SEND_MESSAGE => ['message' => 'abc', Grpc\OP_SEND_MESSAGE => ['message' => 'abc',
'flags' => 'invalid'], 'flags' => 'invalid',
],
]); ]);
} }
@ -574,7 +575,7 @@ class EndToEndTest extends PHPUnit_Framework_TestCase
public function testGetConnectivityStateInvalidParam() public function testGetConnectivityStateInvalidParam()
{ {
$this->assertTrue($this->channel->getConnectivityState( $this->assertTrue($this->channel->getConnectivityState(
new Grpc\Timeval)); new Grpc\Timeval()));
} }
/** /**
@ -591,12 +592,11 @@ class EndToEndTest extends PHPUnit_Framework_TestCase
*/ */
public function testChannelConstructorInvalidParam() public function testChannelConstructorInvalidParam()
{ {
$this->channel = new Grpc\Channel('localhost:'.$this->port, NULL); $this->channel = new Grpc\Channel('localhost:'.$this->port, null);
} }
public function testClose() public function testClose()
{ {
$this->assertNull($this->channel->close()); $this->assertNull($this->channel->close());
} }
} }

@ -67,5 +67,4 @@ class ServerTest extends PHPUnit_Framework_TestCase
$this->server = new Grpc\Server([]); $this->server = new Grpc\Server([]);
$this->port = $this->server->addSecureHttp2Port(['0.0.0.0:0']); $this->port = $this->server->addSecureHttp2Port(['0.0.0.0:0']);
} }
}
}

@ -94,13 +94,13 @@ class TimevalTest extends PHPUnit_Framework_TestCase
public function testSimilar() public function testSimilar()
{ {
$a = Grpc\Timeval::now(); $a = Grpc\Timeval::now();
$delta = new Grpc\Timeval(1000); $delta = new Grpc\Timeval(1000);
$b = $a->add($delta); $b = $a->add($delta);
$thresh = new Grpc\Timeval(1100); $thresh = new Grpc\Timeval(1100);
$this->assertTrue(Grpc\Timeval::similar($a, $b, $thresh)); $this->assertTrue(Grpc\Timeval::similar($a, $b, $thresh));
$thresh = new Grpc\Timeval(900); $thresh = new Grpc\Timeval(900);
$this->assertFalse(Grpc\Timeval::similar($a, $b, $thresh)); $this->assertFalse(Grpc\Timeval::similar($a, $b, $thresh));
} }
public function testSleepUntil() public function testSleepUntil()
@ -155,5 +155,4 @@ class TimevalTest extends PHPUnit_Framework_TestCase
{ {
$a = Grpc\Timeval::similar(1000, 1100, 1200); $a = Grpc\Timeval::similar(1000, 1100, 1200);
} }
} }

Loading…
Cancel
Save