diff options
author | murgatroid99 <michael.lumish@gmail.com> | 2015-02-02 11:36:56 -0800 |
---|---|---|
committer | murgatroid99 <michael.lumish@gmail.com> | 2015-02-02 11:36:56 -0800 |
commit | 5accd24a76e439f4e68aa412814ebebf07fbb2f1 (patch) | |
tree | bb1e5db366a1f5959de80b4162c84e1ea3c2c809 /src/php/tests/generated_code | |
parent | 25e5f67bb95f4c848c003f19272b8c1030efbfe5 (diff) |
Removed uses of assertEquals, which internally uses weak comparison
Diffstat (limited to 'src/php/tests/generated_code')
-rwxr-xr-x | src/php/tests/generated_code/GeneratedCodeTest.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/php/tests/generated_code/GeneratedCodeTest.php b/src/php/tests/generated_code/GeneratedCodeTest.php index 42d25e4614..ee7b871123 100755 --- a/src/php/tests/generated_code/GeneratedCodeTest.php +++ b/src/php/tests/generated_code/GeneratedCodeTest.php @@ -17,9 +17,9 @@ class GeneratedCodeTest extends PHPUnit_Framework_TestCase { $div_arg->setDividend(7); $div_arg->setDivisor(4); list($response, $status) = self::$client->Div($div_arg)->wait(); - $this->assertEquals(1, $response->getQuotient()); - $this->assertEquals(3, $response->getRemainder()); - $this->assertEquals(\Grpc\STATUS_OK, $status->code); + $this->assertSame(1, $response->getQuotient()); + $this->assertSame(3, $response->getRemainder()); + $this->assertSame(\Grpc\STATUS_OK, $status->code); } public function testServerStreaming() { @@ -31,9 +31,9 @@ class GeneratedCodeTest extends PHPUnit_Framework_TestCase { return $num->getNum(); }; $values = array_map($extract_num, $result_array); - $this->assertEquals([1, 1, 2, 3, 5, 8, 13], $values); + $this->assertSame([1, 1, 2, 3, 5, 8, 13], $values); $status = $call->getStatus(); - $this->assertEquals(\Grpc\STATUS_OK, $status->code); + $this->assertSame(\Grpc\STATUS_OK, $status->code); } public function testClientStreaming() { @@ -46,8 +46,8 @@ class GeneratedCodeTest extends PHPUnit_Framework_TestCase { }; $call = self::$client->Sum($num_iter()); list($response, $status) = $call->wait(); - $this->assertEquals(21, $response->getNum()); - $this->assertEquals(\Grpc\STATUS_OK, $status->code); + $this->assertSame(21, $response->getNum()); + $this->assertSame(\Grpc\STATUS_OK, $status->code); } public function testBidiStreaming() { @@ -58,11 +58,11 @@ class GeneratedCodeTest extends PHPUnit_Framework_TestCase { $div_arg->setDivisor(2); $call->write($div_arg); $response = $call->read(); - $this->assertEquals($i, $response->getQuotient()); - $this->assertEquals(1, $response->getRemainder()); + $this->assertSame($i, $response->getQuotient()); + $this->assertSame(1, $response->getRemainder()); } $call->writesDone(); $status = $call->getStatus(); - $this->assertEquals(\Grpc\STATUS_OK, $status->code); + $this->assertSame(\Grpc\STATUS_OK, $status->code); } }
\ No newline at end of file |