Skip to content
Snippets Groups Projects
Commit c0034dd1 authored by Stanley Cheung's avatar Stanley Cheung
Browse files

review feedback: unit test of uri value too strict

parent db98e085
No related branches found
No related tags found
No related merge requests found
...@@ -333,7 +333,7 @@ if (in_array($args['test_case'], array( ...@@ -333,7 +333,7 @@ if (in_array($args['test_case'], array(
} }
$internal_stub = new Grpc\BaseStub($server_address, $opts); $internal_stub = new Grpc\BaseStub($server_address, $opts);
hardAssert($internal_stub->getTarget() == $server_address, hardAssert(is_string($internal_stub->getTarget()),
'Unexpected target URI value'); 'Unexpected target URI value');
$stub = new grpc\testing\TestServiceClient($internal_stub); $stub = new grpc\testing\TestServiceClient($internal_stub);
......
...@@ -81,6 +81,6 @@ class CallTest extends PHPUnit_Framework_TestCase{ ...@@ -81,6 +81,6 @@ class CallTest extends PHPUnit_Framework_TestCase{
} }
public function testGetPeer() { public function testGetPeer() {
$this->assertTrue($this->call->getPeer() == 'localhost:' . self::$port); $this->assertTrue(is_string($this->call->getPeer()));
} }
} }
...@@ -151,6 +151,6 @@ class EndToEndTest extends PHPUnit_Framework_TestCase{ ...@@ -151,6 +151,6 @@ class EndToEndTest extends PHPUnit_Framework_TestCase{
} }
public function testGetTarget() { public function testGetTarget() {
$this->assertTrue($this->channel->getTarget() == 'localhost:' . $this->port); $this->assertTrue(is_string($this->channel->getTarget()));
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment