This repository has been archived by the owner on Jan 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed unset field default values (#94)
- Loading branch information
1 parent
3ab9e6a
commit cbea42f
Showing
5 changed files
with
69 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--TEST-- | ||
Protocol Buffers unset field default values | ||
--SKIPIF-- | ||
<?php require 'skipif.inc' ?> | ||
--FILE-- | ||
<?php | ||
require 'Foo.php'; | ||
|
||
$foo = new Foo(); | ||
var_dump($foo->getDoubleField()); | ||
var_dump($foo->getFloatField()); | ||
var_dump($foo->getInt32Field()); | ||
var_dump($foo->getInt64Field()); | ||
var_dump($foo->getUint32Field()); | ||
var_dump($foo->getUint64Field()); | ||
var_dump($foo->getSint32Field()); | ||
var_dump($foo->getSint64Field()); | ||
var_dump($foo->getFixed32Field()); | ||
var_dump($foo->getFixed64Field()); | ||
var_dump($foo->getSfixed32Field()); | ||
var_dump($foo->getSfixed64Field()); | ||
var_dump($foo->getBoolField()); | ||
var_dump($foo->getStringField()); | ||
var_dump($foo->getBytesField()); | ||
var_dump($foo->getRepeatedField()); | ||
var_dump($foo->getEmbeddedField()); | ||
?> | ||
--EXPECT-- | ||
float(0) | ||
float(0) | ||
int(0) | ||
int(0) | ||
int(0) | ||
int(0) | ||
int(0) | ||
int(0) | ||
int(0) | ||
int(0) | ||
int(0) | ||
int(0) | ||
bool(false) | ||
string(0) "" | ||
string(0) "" | ||
array(0) { | ||
} | ||
NULL |