File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,17 @@ public function setUp()
2323 {
2424 $ this ->authentication = m::mock ('\Jumper\Communicator\Authentication ' );
2525
26- $ this ->communicator = new \Jumper \Communicator \Ssh ($ this ->authentication , array ());
26+ if (method_exists ('ReflectionClass ' , 'newInstanceWithoutConstructor ' )) {
27+ $ class = new ReflectionClass ('\Jumper\Communicator\Ssh ' );
28+ $ this ->communicator = $ class ->newInstanceWithoutConstructor ();
29+ $ property = new ReflectionProperty ($ this ->communicator , 'authentication ' );
30+ $ property ->setAccessible (true );
31+ $ property ->setValue ($ this ->communicator , $ this ->authentication );
32+ $ property ->setAccessible (false );
33+ } else {
34+ set_error_handler (function () {}, E_USER_NOTICE );
35+ $ this ->communicator = new \Jumper \Communicator \Ssh ($ this ->authentication , array ());
36+ }
2737
2838 $ this ->ssh = m::mock ('\Net_SSH2 ' );
2939 $ this ->ssh ->shouldReceive ('disconnect ' );
@@ -34,7 +44,6 @@ public function setUp()
3444 }
3545
3646 /**
37- * @test
3847 */
3948 public function defaultOptionsShouldExpectedIfEmptyArrayIsPassed ()
4049 {
Original file line number Diff line number Diff line change 11<?php
22
3+ date_default_timezone_set ('Europe/Paris ' );
34require __DIR__ . '/../../vendor/autoload.php ' ;
You can’t perform that action at this time.
0 commit comments