From c40a6f91de08a39d9f66c7c5a5463893edcbedf8 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Mon, 16 Oct 2023 13:28:46 -0700 Subject: [PATCH] fix debuginfo tests --- php/tests/DebugInfoTest.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/php/tests/DebugInfoTest.php b/php/tests/DebugInfoTest.php index 5ffe676695..296f0ef1e5 100644 --- a/php/tests/DebugInfoTest.php +++ b/php/tests/DebugInfoTest.php @@ -34,18 +34,25 @@ use Google\Protobuf\GPBEmpty; class DebugInfoTest extends TestBase { + public function setUp(): void + { + if (extension_loaded('protobuf')) { + $this->markTestSkipped('__debugInfo is not supported for the protobuf extension'); + } + } + public function testVarDumpOutput() { $m = new DoubleValue(); $m->setValue(1.5); var_dump($m); - $this->expectOutputString(<< float(1.5) } - -EOL); +EOL; + $this->expectOutputRegex('/' . sprintf(preg_quote($regex), '\d+') . '/'); } public function testTopLevelDoubleValue()