Merge pull request #8005 from haberman/php-filefix
Moved HasOneof test into GeneratedClassTest.php, to avoid the extra file.pull/8006/head^2
commit
7b56ea3ac3
4 changed files with 18 additions and 28 deletions
@ -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()); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue