From 75b69887aa446aeb7f1b6325ec826f2b5ddfa972 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Wed, 5 Oct 2016 10:54:39 -0700 Subject: Fix segmentation fault when ZTS is defined. --- php/tests/array_test.php | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'php/tests') diff --git a/php/tests/array_test.php b/php/tests/array_test.php index d683add5..09d4dc82 100644 --- a/php/tests/array_test.php +++ b/php/tests/array_test.php @@ -789,26 +789,26 @@ class RepeatedFieldTest extends PHPUnit_Framework_TestCase $this->assertSame(1, count($arr)); } - public function testInsertRemoval() - { - $arr = new RepeatedField(GPBType::INT32); - - $arr []= 0; - $arr []= 1; - $arr []= 2; - $this->assertSame(3, count($arr)); - - unset($arr[2]); - $this->assertSame(2, count($arr)); - $this->assertSame(0, $arr[0]); - $this->assertSame(1, $arr[1]); - - $arr [] = 3; - $this->assertSame(3, count($arr)); - $this->assertSame(0, $arr[0]); - $this->assertSame(1, $arr[1]); - $this->assertSame(3, $arr[2]); - } + public function testInsertRemoval() + { + $arr = new RepeatedField(GPBType::INT32); + + $arr []= 0; + $arr []= 1; + $arr []= 2; + $this->assertSame(3, count($arr)); + + unset($arr[2]); + $this->assertSame(2, count($arr)); + $this->assertSame(0, $arr[0]); + $this->assertSame(1, $arr[1]); + + $arr [] = 3; + $this->assertSame(3, count($arr)); + $this->assertSame(0, $arr[0]); + $this->assertSame(1, $arr[1]); + $this->assertSame(3, $arr[2]); + } /** * @expectedException PHPUnit_Framework_Error -- cgit v1.2.3