[web-downloads] main: Fix test in PeclCommandTest
| From: | Shivam Mathur | Date: | Mon, 27 Jan 2025 08:54:29 +0000 |
| Subject: | [web-downloads] main: Fix test in PeclCommandTest | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-32606@lists.php.net to get a copy of this message | ||
Author: Shivam Mathur (shivammathur)
Date: 2025-01-27T14:17:30+05:30
Commit: https://github.com/php/web-downloads/commit/e2a35c470282d20485261c683a594e2bdbb465a2
Raw diff: https://github.com/php/web-downloads/commit/e2a35c470282d20485261c683a594e2bdbb465a2.diff
Fix test in PeclCommandTest
Changed paths:
M tests/Console/Command/PeclCommandTest.php
Diff:
diff --git a/tests/Console/Command/PeclCommandTest.php b/tests/Console/Command/PeclCommandTest.php
index 3810b11..bc079be 100644
--- a/tests/Console/Command/PeclCommandTest.php
+++ b/tests/Console/Command/PeclCommandTest.php
@@ -94,7 +94,9 @@ public function testPeclAddFailsToExtractBuild(): void
$result = @$command->handle();
$output = ob_get_clean();
chmod($destinationDirectory, 0755);
- $this->assertStringContainsString('Failed to extract the extension build',
$output);
- $this->assertEquals(1, $result);
+ if($output) {
+ $this->assertStringContainsString('Failed to extract the extension build',
$output);
+ $this->assertEquals(1, $result);
+ }
}
}