New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use dedicated PHPUnit assertions #1331
Use dedicated PHPUnit assertions #1331
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this :)
Any of the tests following a structure of */tests/Unit/V*/*
are actually auto-generated. We would need to update the template found in this repository or the next time we generate they'll just wipe out these changes. Would you be able to omit those here and we can follow them up on the generator?
@dwsupplee Sure. Gonna update the template and remove those from this patch :) |
Awesome! This is the file that needs to be touched: https://github.com/googleapis/gapic-generator/blob/master/src/main/resources/com/google/api/codegen/php/test.snip |
Vision/tests/Unit/ImageTest.php
Outdated
@@ -157,6 +157,6 @@ public function testUrlSchemes() | |||
$this->assertEquals($urls[0], $images[0]->requestObject()['image']['source']['imageUri']); | |||
$this->assertEquals($urls[1], $images[1]->requestObject()['image']['source']['imageUri']); | |||
$this->assertEquals($urls[2], $images[2]->requestObject()['image']['source']['imageUri']); | |||
$this->assertFalse(isset($images[3]->requestObject()['image']['source']['imageUri'])); | |||
$this->assertArrayNotHasKey('imageUri', $images[3]->requestObject()['image']['source']); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Datastore/tests/Unit/EntityTest.php
Outdated
@@ -66,7 +66,7 @@ public function testCreateEntity() | |||
$this->assertNull($entity->nonExistentMagicProperty); | |||
$this->assertObjectNotHasAttribute('nonExistentMagicProperty', $entity); | |||
|
|||
$this->assertTrue(isset($entity->magicProperty)); | |||
$this->assertObjectHasAttribute('magicProperty', $entity); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
## Google Cloud PHP v0.82.0 ### google/cloud-bigquery v1.4.5 * Remove unnecessary ternary expression (#1327) * Use dedicated PHPUnit assertions (#1331) ### google/cloud-core v1.23.7 * Use combined assignment operators when possible (#1328) * Remove unused variables passed to closures (#1330) ### google/cloud-datastore v1.5.10 * Use combined assignment operators when possible (#1328) * Use dedicated PHPUnit assertions (#1331) ### google/cloud-debugger v0.14.2 * Remove unused variables passed to closures (#1330) * Use dedicated PHPUnit assertions (#1331) ### google/cloud-firestore v0.15.3 * Fix handling of empty sets in Firestore updates (#1316) * Remove auxiliary variables when they are return right away (#1329) ### google/cloud-spanner v1.11.0 * Use combined assignment operators when possible (#1328) * Remove unused variables passed to closures (#1330) * Add support for DML and Partitioned DML (#1309) ### google/cloud-storage v1.9.1 * Use dedicated PHPUnit assertions (#1331) ### google/cloud-vision v0.17.2 * Use dedicated PHPUnit assertions (#1331)
Following #862, #774 and #769