@@ -48,30 +48,51 @@ public function testGetEnvWithPutEnv()
48
48
$ this ->assertEquals ('true ' , Utility::getEnv (Utility::ENV_URL_PLUS_AS_SPACE ));
49
49
}
50
50
51
- public function testUrlencodeWithDefault ()
51
+ public function testUrlWithPlusAsDefault ()
52
52
{
53
53
$ url = Utility::urlencode ('bar baz ' );
54
54
$ this ->assertEquals ('bar+baz ' , $ url );
55
55
}
56
56
57
- public function testUrlencodeWithDollarServer ()
57
+ public function testUrlWithPlusWithDollarServer ()
58
58
{
59
59
$ _SERVER [Utility::ENV_URL_PLUS_AS_SPACE ] = 'true ' ;
60
60
$ url = Utility::urlencode ('bar baz ' );
61
- $ this ->assertEquals ('bar%20baz ' , $ url );
61
+ $ this ->assertEquals ('bar+baz ' , $ url );
62
62
}
63
63
64
- public function testUrlencodeWithDollarEnv ()
64
+ public function testUrlWithPlusWithDollarEnv ()
65
65
{
66
66
$ _ENV [Utility::ENV_URL_PLUS_AS_SPACE ] = 'true ' ;
67
67
$ url = Utility::urlencode ('bar baz ' );
68
- $ this ->assertEquals ('bar%20baz ' , $ url );
68
+ $ this ->assertEquals ('bar+baz ' , $ url );
69
69
}
70
70
71
- public function testUrlencodeWithPutEnv ()
71
+ public function testUrlWithPlusWithPutEnv ()
72
72
{
73
73
putenv (Utility::ENV_URL_PLUS_AS_SPACE . '=true ' );
74
74
$ url = Utility::urlencode ('bar baz ' );
75
+ $ this ->assertEquals ('bar+baz ' , $ url );
76
+ }
77
+
78
+ public function testUrlWith2BWithDollarServer ()
79
+ {
80
+ $ _SERVER [Utility::ENV_URL_PLUS_AS_SPACE ] = 'false ' ;
81
+ $ url = Utility::urlencode ('bar baz ' );
82
+ $ this ->assertEquals ('bar%20baz ' , $ url );
83
+ }
84
+
85
+ public function testUrlWith2BWithDollarEnv ()
86
+ {
87
+ $ _ENV [Utility::ENV_URL_PLUS_AS_SPACE ] = 'false ' ;
88
+ $ url = Utility::urlencode ('bar baz ' );
89
+ $ this ->assertEquals ('bar%20baz ' , $ url );
90
+ }
91
+
92
+ public function testUrlWith2BWithPutEnv ()
93
+ {
94
+ putenv (Utility::ENV_URL_PLUS_AS_SPACE . '=false ' );
95
+ $ url = Utility::urlencode ('bar baz ' );
75
96
$ this ->assertEquals ('bar%20baz ' , $ url );
76
97
}
77
98
}
0 commit comments