Skip to content

Commit 1908d8b

Browse files
test: invert context of when basic auth is requested without username AND password
1 parent 2b549f2 commit 1908d8b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIAuthBasicAuthTestCase.inc‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ class APIAuthBasicAuthTestCase extends TestCase {
3333
$auth = new BasicAuth();
3434
$this->assert_is_false($auth->is_requested());
3535

36-
# Ensure is_requested() returns true if either a basic username or password are specified
36+
# Ensure is_requested() returns false if either a basic username or password are specified
3737
$_SERVER['PHP_AUTH_USER'] = 'admin';
3838
$_SERVER['PHP_AUTH_PW'] = null;
3939
$auth = new BasicAuth();
40-
$this->assert_is_true($auth->is_requested());
40+
$this->assert_is_false($auth->is_requested());
4141
$_SERVER['PHP_AUTH_USER'] = null;
4242
$_SERVER['PHP_AUTH_PW'] = 'pfsense';
43-
$this->assert_is_true($auth->is_requested());
43+
$this->assert_is_false($auth->is_requested());
4444
$_SERVER['PHP_AUTH_USER'] = 'admin';
4545
$_SERVER['PHP_AUTH_PW'] = 'pfsense';
46-
$this->assert_is_true($auth->is_requested());
46+
$this->assert_is_false($auth->is_requested());
4747
}
4848
}

0 commit comments

Comments
 (0)