Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/functional/AccountDeletionRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private function getNumberAccountDeletionRequests()
public function testRequestAccountDeletionUserHasNoGroups()
{
global $USER, $SQL;
switchUser(...getUserHasNotRequestedAccountDeletionHasNoGroups());
switchUser(...getBlankUser());
$this->assertEmpty($USER->getPIGroupGIDs());
$this->assertNumberAccountDeletionRequests(0);
try {
Expand Down
2 changes: 1 addition & 1 deletion test/functional/PIMemberRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function testRequestMembership()
$this->assertTrue($pi_group->exists());
$this->assertEqualsCanonicalizing([$pi], $pi_group->getGroupMembers());
$this->assertEqualsCanonicalizing([], $SQL->getRequests($gid));
switchUser(...getUserNotPiNotRequestedBecomePi());
switchUser(...getBlankUser());
$uid = $USER->uid;
$this->assertFalse($USER->isPI());
$this->assertFalse($SQL->requestExists($uid, UnitySQL::REQUEST_BECOME_PI));
Expand Down
2 changes: 1 addition & 1 deletion test/functional/PiBecomeRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private function getNumberPiBecomeRequests()
public function testRequestBecomePi()
{
global $USER, $SQL;
switchUser(...getUserNotPiNotRequestedBecomePi());
switchUser(...getBlankUser());
$this->assertFalse($USER->isPI());
$this->assertNumberPiBecomeRequests(0);
try {
Expand Down
8 changes: 2 additions & 6 deletions test/phpunit-bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ function getUserHasNotRequestedAccountDeletionHasGroup()
return ["[email protected]", "foo", "bar", "[email protected]"];
}

function getUserHasNotRequestedAccountDeletionHasNoGroups()
/* a blank user has no requests, no PI group, and has not requested account deletion */
function getBlankUser()
{
return ["[email protected]", "foo", "bar", "[email protected]"];
}
Expand All @@ -249,11 +250,6 @@ function getUserHasNoSshKeys()
return ["[email protected]", "foo", "bar", "[email protected]"];
}

function getUserNotPiNotRequestedBecomePi()
{
return ["[email protected]", "foo", "bar", "[email protected]"];
}

function getUserNotPiNotRequestedBecomePiRequestedAccountDeletion()
{
return ["[email protected]", "foo", "bar", "[email protected]"];
Expand Down