Skip to content
This repository was archived by the owner on Mar 15, 2020. It is now read-only.

Commit 56962ea

Browse files
committed
Marked OpenSSL-dependent tests as skipped when the openssl extension is missing (i.e. 5.3.3 on Travis)
1 parent f53c659 commit 56962ea

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tests/Humbug/Test/SelfUpdate/UpdaterGithubStrategyTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ public function testSetStabilityThrowsExceptionOnInvalidStabilityValue()
9999
*/
100100
public function testUpdatePhar()
101101
{
102+
if (!extension_loaded('openssl')) {
103+
$this->markTestSkipped('This test requires the openssl extension to run.');
104+
}
105+
102106
$this->createTestPharAndKey();
103107
$this->assertEquals('old', $this->getPharOutput($this->tmp . '/old.phar'));
104108

tests/Humbug/Test/SelfUpdate/UpdaterTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ public function testThrowsExceptionOnInvalidRemoteVersion()
132132
*/
133133
public function testUpdatePhar()
134134
{
135+
if (!extension_loaded('openssl')) {
136+
$this->markTestSkipped('This test requires the openssl extension to run.');
137+
}
138+
135139
$this->createTestPharAndKey();
136140
$this->assertEquals('old', $this->getPharOutput($this->tmp . '/old.phar'));
137141

@@ -175,6 +179,10 @@ public function testUpdatePharFailsIfCurrentPublicKeyInvalid()
175179
*/
176180
public function testUpdatePharFailsOnExpectedSignatureMismatch()
177181
{
182+
if (!extension_loaded('openssl')) {
183+
$this->markTestSkipped('This test requires the openssl extension to run.');
184+
}
185+
178186
$this->createTestPharAndKey();
179187
$this->assertEquals('old', $this->getPharOutput($this->tmp . '/old.phar'));
180188

0 commit comments

Comments
 (0)