File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ public function add_args($arg_key, $value = NULL) {
58
58
$ this ->proxy_user = "-proxyUser $ value " ;
59
59
elseif ($ arg_key == "proxyPass " )
60
60
$ this ->proxy_pass = "-proxyPass $ value " ;
61
+ elseif ($ arg_key == "forceproxy " )
62
+ $ this ->force_proxy_flag = "-forceproxy " ;
61
63
elseif ($ arg_key == "hosts " )
62
64
$ this ->hosts = $ value ;
63
65
elseif ($ arg_key == "f " ) {
@@ -136,7 +138,7 @@ public function command() {
136
138
if (strtoupper (substr (PHP_OS , 0 , 3 )) === 'WIN ' )
137
139
$ exec = "call " ;
138
140
139
- $ command = "$ exec $ this ->binary_path -logFile $ this ->logfile $ this ->folder_flag $ this ->key $ this ->folder_path $ this ->force_local_flag $ this ->local_identifier_flag $ this ->only_flag $ this ->only_automate_flag $ this ->proxy_host $ this ->proxy_port $ this ->proxy_user $ this ->proxy_pass $ this ->force_flag $ this ->verbose_flag $ this ->hosts " ;
141
+ $ command = "$ exec $ this ->binary_path -logFile $ this ->logfile $ this ->folder_flag $ this ->key $ this ->folder_path $ this ->force_local_flag $ this ->local_identifier_flag $ this ->only_flag $ this ->only_automate_flag $ this ->proxy_host $ this ->proxy_port $ this ->proxy_user $ this ->proxy_pass $ this ->force_proxy_flag $ this -> force_flag $ this ->verbose_flag $ this ->hosts " ;
140
142
$ command = preg_replace ('/\s+/S ' , " " , $ command );
141
143
return $ command ;
142
144
}
Original file line number Diff line number Diff line change @@ -63,6 +63,12 @@ public function test_set_proxy() {
63
63
$ this ->assertContains ('-proxyHost localhost -proxyPort 8080 -proxyUser user -proxyPass pass ' ,$ this ->bs_local ->command ());
64
64
}
65
65
66
+ public function test_enable_force_proxy () {
67
+ $ this ->bs_local ->add_args ("forceproxy " );
68
+ $ this ->assertContains ('-forceproxy ' ,$ this ->bs_local ->command ());
69
+ }
70
+
71
+
66
72
public function test_hosts () {
67
73
$ this ->bs_local ->add_args ("hosts " , "localhost,8080,0 " );
68
74
$ this ->assertContains ('localhost,8080,0 ' ,$ this ->bs_local ->command ());
You can’t perform that action at this time.
0 commit comments