Skip to content

Commit 54786b1

Browse files
committed
Gate SSH integration tests behind explicit opt-in
1 parent a35480a commit 54786b1

3 files changed

Lines changed: 13 additions & 23 deletions

File tree

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
"phpseclib/phpseclib": "^2.0"
1515
},
1616
"require-dev": {
17-
"phpunit/phpunit": "^7.0||^8.0",
18-
"php-coveralls/php-coveralls": "^2.0"
17+
"phpunit/phpunit": "^9.6"
1918
},
2019
"autoload": {
2120
"psr-4": {

phpunit.xml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
bootstrap="vendor/autoload.php"
2+
<phpunit bootstrap="vendor/autoload.php"
53
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false">
4+
cacheResult="false">
115
<testsuites>
126
<testsuite name="Unit Tests">
13-
<directory suffix="Test.php">./tests/Unit</directory>
147
<directory suffix="Test.php">./tests/Integration</directory>
158
</testsuite>
169
</testsuites>
17-
<filter>
18-
<whitelist>
19-
<directory suffix=".php">src</directory>
20-
<exclude>
21-
<directory suffix=".php">src/Examples</directory>
22-
</exclude>
23-
</whitelist>
24-
</filter>
25-
<php>
26-
27-
</php>
28-
</phpunit>
10+
</phpunit>

tests/Integration/SSHConnectionTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55

66
final class SSHConnectionTest extends TestCase
77
{
8+
protected function setUp(): void
9+
{
10+
parent::setUp();
11+
12+
if (getenv('RUN_SSH_INTEGRATION_TESTS') !== '1') {
13+
$this->markTestSkipped('Set RUN_SSH_INTEGRATION_TESTS=1 to run SSH integration tests.');
14+
}
15+
}
16+
817
public function testUpload()
918
{
1019
$connection = (new SSHConnection())

0 commit comments

Comments
 (0)