@@ -21,45 +21,59 @@ public function tearDown(){
2121 }
2222
2323 public function test_verbose () {
24- $ this ->bs_local ->add_args ('- v ' );
24+ $ this ->bs_local ->add_args ('v ' );
2525 $ this ->assertContains ('-v ' ,$ this ->bs_local ->command ());
2626 }
2727
2828 public function test_set_folder () {
29- $ this ->bs_local ->add_args ('- f ' , "/ " );
29+ $ this ->bs_local ->add_args ('f ' , "/ " );
3030 $ this ->assertContains ('-f ' ,$ this ->bs_local ->command ());
3131 $ this ->assertContains ('/ ' ,$ this ->bs_local ->command ());
3232 }
3333
3434 public function test_enable_force () {
35- $ this ->bs_local ->add_args ("- force " );
35+ $ this ->bs_local ->add_args ("force " );
3636 }
3737
3838 public function test_set_local_identifier () {
39- $ this ->bs_local ->add_args ("- localIdentifier " , "randomString " );
39+ $ this ->bs_local ->add_args ("localIdentifier " , "randomString " );
4040 $ this ->assertContains ('-localIdentifier randomString ' ,$ this ->bs_local ->command ());
4141 }
4242
4343 public function test_enable_only () {
44- $ this ->bs_local ->add_args ("- only " );
44+ $ this ->bs_local ->add_args ("only " );
4545 $ this ->assertContains ('-only ' ,$ this ->bs_local ->command ());
4646 }
4747
4848 public function test_enable_only_automate () {
49- $ this ->bs_local ->add_args ("- onlyAutomate " );
49+ $ this ->bs_local ->add_args ("onlyAutomate " );
5050 $ this ->assertContains ('-onlyAutomate ' , $ this ->bs_local ->command ());
5151 }
5252
5353 public function test_enable_force_local () {
54- $ this ->bs_local ->add_args ("- forcelocal " );
54+ $ this ->bs_local ->add_args ("forcelocal " );
5555 $ this ->assertContains ('-forcelocal ' ,$ this ->bs_local ->command ());
5656 }
5757
58+ public function test_custom_boolean_argument () {
59+ $ this ->bs_local ->add_args ("boolArg1 " , true );
60+ $ this ->bs_local ->add_args ("boolArg2 " , true );
61+ $ this ->assertContains ('-boolArg1 ' ,$ this ->bs_local ->command ());
62+ $ this ->assertContains ('-boolArg2 ' ,$ this ->bs_local ->command ());
63+ }
64+
65+ public function test_custom_keyval () {
66+ $ this ->bs_local ->add_args ("customKey1 " , "custom value1 " );
67+ $ this ->bs_local ->add_args ("customKey2 " , "custom value2 " );
68+ $ this ->assertContains ('-customKey1 \'custom value1 \'' ,$ this ->bs_local ->command ());
69+ $ this ->assertContains ('-customKey2 \'custom value2 \'' ,$ this ->bs_local ->command ());
70+ }
71+
5872 public function test_set_proxy () {
59- $ this ->bs_local ->add_args ("- proxyHost " , "localhost " );
60- $ this ->bs_local ->add_args ("- proxyPort " , 8080 );
61- $ this ->bs_local ->add_args ("- proxyUser " , "user " );
62- $ this ->bs_local ->add_args ("- proxyPass " , "pass " );
73+ $ this ->bs_local ->add_args ("proxyHost " , "localhost " );
74+ $ this ->bs_local ->add_args ("proxyPort " , 8080 );
75+ $ this ->bs_local ->add_args ("proxyUser " , "user " );
76+ $ this ->bs_local ->add_args ("proxyPass " , "pass " );
6377 $ this ->assertContains ('-proxyHost localhost -proxyPort 8080 -proxyUser user -proxyPass pass ' ,$ this ->bs_local ->command ());
6478 }
6579
@@ -68,35 +82,34 @@ public function test_enable_force_proxy() {
6882 $ this ->assertContains ('-forceproxy ' ,$ this ->bs_local ->command ());
6983 }
7084
71-
7285 public function test_hosts () {
7386 $ this ->bs_local ->add_args ("-hosts " , "localhost,8080,0 " );
7487 $ this ->assertContains ('localhost,8080,0 ' ,$ this ->bs_local ->command ());
7588 }
7689
7790 public function test_isRunning () {
7891 $ this ->assertFalse ($ this ->bs_local ->isRunning ());
79- $ this ->bs_local ->start (array ('- v ' => true ));
92+ $ this ->bs_local ->start (array ('v ' => true ));
8093 $ this ->assertTrue ($ this ->bs_local ->isRunning ());
8194 $ this ->bs_local ->stop ();
8295 $ this ->assertFalse ($ this ->bs_local ->isRunning ());
83- $ this ->bs_local ->start (array ('- v ' => true ));
96+ $ this ->bs_local ->start (array ('v ' => true ));
8497 $ this ->assertTrue ($ this ->bs_local ->isRunning ());
8598 }
8699
87100 public function test_checkPid () {
88101 $ this ->assertFalse ($ this ->bs_local ->isRunning ());
89- $ this ->bs_local ->start (array ('- v ' => true ));
102+ $ this ->bs_local ->start (array ('v ' => true ));
90103 $ this ->assertTrue ($ this ->bs_local ->pid > 0 );
91104 }
92105
93106 public function test_multiple_binary () {
94- $ this ->bs_local ->start (array ('- v ' => true ));
107+ $ this ->bs_local ->start (array ('v ' => true ));
95108 $ bs_local_2 = new Local ();
96109 $ log_file2 = getcwd (). '/log2.log ' ;
97110 print ($ log_file2 );
98111 try {
99- $ bs_local_2 ->start (array ('- v ' => true , '- logfile ' => $ log_file2 ));
112+ $ bs_local_2 ->start (array ('v ' => true , 'logfile ' => $ log_file2 ));
100113 $ this ->fail ("Expected Exception has not been raised. " );
101114 } catch (LocalException $ ex ) {
102115 $ emessage = $ ex ->getMessage ();
0 commit comments