Skip to content

Commit 17c2547

Browse files
authored
Test against protobuf extension v3.7.0 and remove skips in tests (#230)
1 parent 3ced1b1 commit 17c2547

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

tests/Tests/Unit/RequestBuilderTest.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,12 @@ public function testMethodWithAdditionalBindings()
210210

211211
public function testMethodWithSpecialJsonMapping()
212212
{
213-
if (extension_loaded('protobuf')) {
214-
$this->markTestSkipped('This is currently broken for the protobuf extension');
215-
}
216-
217213
$bytesValue = (new BytesValue)
218214
->setValue('\000');
219215
$durationValue = (new Duration)
220-
->setSeconds(9001);
216+
->setSeconds(9001)
217+
->setNanos(500000);
218+
221219
$fieldMask = (new FieldMask)
222220
->setPaths(['path1', 'path2']);
223221
$int64Value = (new Int64Value)
@@ -257,7 +255,7 @@ public function testMethodWithSpecialJsonMapping()
257255
$query = Psr7\parse_query($uri->getQuery());
258256

259257
$this->assertEquals('XDAwMA==', $query['bytesValue']);
260-
$this->assertEquals('9001.000000000s', $query['durationValue']);
258+
$this->assertEquals('9001.000500000s', $query['durationValue']);
261259
$this->assertEquals('path1,path2', $query['fieldMask']);
262260
$this->assertEquals(100, $query['int64Value']);
263261
$this->assertEquals(['val1', 'val2'], $query['listValue']);
@@ -269,10 +267,6 @@ public function testMethodWithSpecialJsonMapping()
269267

270268
public function testMethodWithoutPlaceholders()
271269
{
272-
if (extension_loaded('protobuf')) {
273-
$this->markTestSkipped('This is currently broken for the protobuf extension');
274-
}
275-
276270
$stringValue = (new StringValue)
277271
->setValue('some-value');
278272

0 commit comments

Comments
 (0)