File tree Expand file tree Collapse file tree 6 files changed +64
-18
lines changed Expand file tree Collapse file tree 6 files changed +64
-18
lines changed Original file line number Diff line number Diff line change 1+ coverage_clover : tests/Logs/clover.xml
2+ json_path : tests/Logs/coveralls-upload.json
3+ service_name : travis-ci
Original file line number Diff line number Diff line change 11.idea
22vendor /
3- composer.lock
3+ composer.lock
4+ * .cache
Original file line number Diff line number Diff line change 1212 "require" : {
1313 "ext-ssh2" : " *"
1414 },
15+ "require-dev" : {
16+ "phpunit/phpunit" : " ^7.0||^8.0" ,
17+ "fzaninotto/faker" : " ^1.6" ,
18+ "php-coveralls/php-coveralls" : " ^2.0" ,
19+ "cache/array-adapter" : " ^1.0"
20+ },
1521 "autoload" : {
1622 "psr-4" : {
1723 "DivineOmega\\ SSHConnection\\ " : " src/"
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <phpunit backupGlobals =" false"
3+ backupStaticAttributes =" false"
4+ bootstrap =" vendor/autoload.php"
5+ colors =" true"
6+ convertErrorsToExceptions =" true"
7+ convertNoticesToExceptions =" true"
8+ convertWarningsToExceptions =" true"
9+ processIsolation =" false"
10+ stopOnFailure =" false" >
11+ <testsuites >
12+ <testsuite name =" Unit Tests" >
13+ <directory suffix =" Test.php" >./tests/Unit</directory >
14+ <directory suffix =" Test.php" >./tests/Integration</directory >
15+ </testsuite >
16+ </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 >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use DivineOmega \SSHConnection \SSHConnection ;
4+ use PHPUnit \Framework \TestCase ;
5+
6+ final class SSHConnectionTest extends TestCase
7+ {
8+ public function testSSHConnection ()
9+ {
10+ $ connection = (new SSHConnection ())
11+ ->to ('test.rebex.net ' )
12+ ->onPort (22 )
13+ ->as ('demo ' )
14+ ->withPassword ('password ' )
15+ ->connect ();
16+
17+ $ command = $ connection ->run ('echo "Hello world!" ' );
18+
19+ $ this ->assertEquals ('Hello world! ' , $ command ->getOutput ());
20+ $ this ->assertEquals ('Hello world! ' ."\n" , $ command ->getRawOutput ());
21+
22+ $ this ->assertEquals ('' , $ command ->getError ());
23+ $ this ->assertEquals ('' , $ command ->getRawError ());
24+ }
25+ }
You can’t perform that action at this time.
0 commit comments