Skip to content

Commit aebb1d8

Browse files
Updated tests
1 parent 123f24c commit aebb1d8

File tree

1 file changed

+16
-22
lines changed

1 file changed

+16
-22
lines changed

tests/Support/SupportHelpersTest.php

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -922,53 +922,47 @@ public function testWith()
922922

923923
public function testEnv()
924924
{
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'));
933927
}
934928

935929
public function testEnvTrue()
936930
{
937-
putenv('foo=true');
931+
$_SERVER['foo'] = 'true';
938932
$this->assertTrue(env('foo'));
939933

940-
putenv('foo=(true)');
934+
$_SERVER['foo'] = '(true)';
941935
$this->assertTrue(env('foo'));
942936
}
943937

944938
public function testEnvFalse()
945939
{
946-
putenv('foo=false');
940+
$_SERVER['foo'] = 'false';
947941
$this->assertFalse(env('foo'));
948942

949-
putenv('foo=(false)');
943+
$_SERVER['foo'] = '(false)';
950944
$this->assertFalse(env('foo'));
951945
}
952946

953947
public function testEnvEmpty()
954948
{
955-
putenv('foo=');
956-
$this->assertEquals('', env('foo'));
949+
$_SERVER['foo'] = '';
950+
$this->assertSame('', env('foo'));
957951

958-
putenv('foo=empty');
959-
$this->assertEquals('', env('foo'));
952+
$_SERVER['foo'] = 'empty';
953+
$this->assertSame('', env('foo'));
960954

961-
putenv('foo=(empty)');
962-
$this->assertEquals('', env('foo'));
955+
$_SERVER['foo'] = '(empty)';
956+
$this->assertSame('', env('foo'));
963957
}
964958

965959
public function testEnvNull()
966960
{
967-
putenv('foo=null');
968-
$this->assertEquals('', env('foo'));
961+
$_SERVER['foo'] = 'null';
962+
$this->assertNull(env('foo'));
969963

970-
putenv('foo=(null)');
971-
$this->assertEquals('', env('foo'));
964+
$_SERVER['foo'] = '(null)';
965+
$this->assertNull(env('foo'));
972966
}
973967
}
974968

0 commit comments

Comments
 (0)