Moved HasOneof test into GeneratedClassTest.php, to avoid the extra file.
diff --git a/php/tests/GeneratedClassTest.php b/php/tests/GeneratedClassTest.php
index 90c1069..037bd1b 100644
--- a/php/tests/GeneratedClassTest.php
+++ b/php/tests/GeneratedClassTest.php
@@ -1672,6 +1672,23 @@
}
#########################################################
+ # Test hasOneof<Field> methods exists and working
+ #########################################################
+
+ public function testHasOneof() {
+ $m = new TestMessage();
+ $this->assertFalse($m->hasOneofInt32());
+ $m->setOneofInt32(42);
+ $this->assertTrue($m->hasOneofInt32());
+ $m->setOneofString("bar");
+ $this->assertFalse($m->hasOneofInt32());
+ $this->assertTrue($m->hasOneofString());
+ $m->clear();
+ $this->assertFalse($m->hasOneofInt32());
+ $this->assertFalse($m->hasOneofString());
+ }
+
+ #########################################################
# Test no segfault when error happens
#########################################################
diff --git a/php/tests/HasOneofTest.php b/php/tests/HasOneofTest.php
deleted file mode 100644
index e7f8954..0000000
--- a/php/tests/HasOneofTest.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-
-require_once('test_util.php');
-
-use Foo\TestMessage;
-
-class HasOneofTest extends \PHPUnit\Framework\TestCase {
-
- #########################################################
- # Test hasOneof<Field> methods exists and working
- #########################################################
-
- public function testHasOneof() {
- $m = new TestMessage();
- $this->assertFalse($m->hasOneofInt32());
- $m->setOneofInt32(42);
- $this->assertTrue($m->hasOneofInt32());
- $m->setOneofString("bar");
- $this->assertFalse($m->hasOneofInt32());
- $this->assertTrue($m->hasOneofString());
- $m->clear();
- $this->assertFalse($m->hasOneofInt32());
- $this->assertFalse($m->hasOneofString());
- }
-
-}
diff --git a/php/tests/test.sh b/php/tests/test.sh
index f693fe6..91ea56e 100755
--- a/php/tests/test.sh
+++ b/php/tests/test.sh
@@ -29,7 +29,7 @@
[ -f $PHPUNIT ] || wget https://phar.phpunit.de/$PHPUNIT
-tests=( ArrayTest.php EncodeDecodeTest.php GeneratedClassTest.php MapFieldTest.php WellKnownTest.php DescriptorsTest.php WrapperTypeSettersTest.php HasOneofTest.php)
+tests=( ArrayTest.php EncodeDecodeTest.php GeneratedClassTest.php MapFieldTest.php WellKnownTest.php DescriptorsTest.php WrapperTypeSettersTest.php)
for t in "${tests[@]}"
do