@@ -922,53 +922,47 @@ public function testWith()
922
922
923
923
public function testEnv ()
924
924
{
925
- putenv ('foo=bar ' );
926
- $ this ->assertEquals ('bar ' , env ('foo ' ));
927
- }
928
-
929
- public function testEnvWithQuotes ()
930
- {
931
- putenv ('foo="bar" ' );
932
- $ this ->assertEquals ('bar ' , env ('foo ' ));
925
+ $ _SERVER ['foo ' ] = 'bar ' ;
926
+ $ this ->assertSame ('bar ' , env ('foo ' ));
933
927
}
934
928
935
929
public function testEnvTrue ()
936
930
{
937
- putenv ( 'foo= true ' ) ;
931
+ $ _SERVER [ 'foo ' ] = ' true ' ;
938
932
$ this ->assertTrue (env ('foo ' ));
939
933
940
- putenv ( 'foo= (true) ' ) ;
934
+ $ _SERVER [ 'foo ' ] = ' (true) ' ;
941
935
$ this ->assertTrue (env ('foo ' ));
942
936
}
943
937
944
938
public function testEnvFalse ()
945
939
{
946
- putenv ( 'foo= false ' ) ;
940
+ $ _SERVER [ 'foo ' ] = ' false ' ;
947
941
$ this ->assertFalse (env ('foo ' ));
948
942
949
- putenv ( 'foo= (false) ' ) ;
943
+ $ _SERVER [ 'foo ' ] = ' (false) ' ;
950
944
$ this ->assertFalse (env ('foo ' ));
951
945
}
952
946
953
947
public function testEnvEmpty ()
954
948
{
955
- putenv ( 'foo= ' ) ;
956
- $ this ->assertEquals ('' , env ('foo ' ));
949
+ $ _SERVER [ 'foo ' ] = '' ;
950
+ $ this ->assertSame ('' , env ('foo ' ));
957
951
958
- putenv ( 'foo= empty ' ) ;
959
- $ this ->assertEquals ('' , env ('foo ' ));
952
+ $ _SERVER [ 'foo ' ] = ' empty ' ;
953
+ $ this ->assertSame ('' , env ('foo ' ));
960
954
961
- putenv ( 'foo= (empty) ' ) ;
962
- $ this ->assertEquals ('' , env ('foo ' ));
955
+ $ _SERVER [ 'foo ' ] = ' (empty) ' ;
956
+ $ this ->assertSame ('' , env ('foo ' ));
963
957
}
964
958
965
959
public function testEnvNull ()
966
960
{
967
- putenv ( 'foo= null ' ) ;
968
- $ this ->assertEquals ( '' , env ('foo ' ));
961
+ $ _SERVER [ 'foo ' ] = ' null ' ;
962
+ $ this ->assertNull ( env ('foo ' ));
969
963
970
- putenv ( 'foo= (null) ' ) ;
971
- $ this ->assertEquals ( '' , env ('foo ' ));
964
+ $ _SERVER [ 'foo ' ] = ' (null) ' ;
965
+ $ this ->assertNull ( env ('foo ' ));
972
966
}
973
967
}
974
968
0 commit comments