diff options
Diffstat (limited to 'php/tests/generated_class_test.php')
-rw-r--r-- | php/tests/generated_class_test.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/php/tests/generated_class_test.php b/php/tests/generated_class_test.php index 21ee8490..b42397bb 100644 --- a/php/tests/generated_class_test.php +++ b/php/tests/generated_class_test.php @@ -877,4 +877,17 @@ class GeneratedClassTest extends TestBase $m = new \Foo\PBEmpty(); $m = new \PrefixEmpty(); } + + ######################################################### + # Test fluent setters. + ######################################################### + + public function testFluentSetters() + { + $m = (new TestMessage()) + ->setOptionalInt32(1) + ->setOptionalInt64(2); + $this->assertSame(1, $m->getOptionalInt32()); + $this->assertSame(2, $m->getOptionalInt64()); + } } |