From 838d29573f4eed9812eef13ff000925ed78a2996 Mon Sep 17 00:00:00 2001 From: Simon Leary Date: Fri, 12 Dec 2025 10:00:19 -0500 Subject: [PATCH 1/6] wip --- .../functional/AccountDeletionRequestTest.php | 25 ---- test/functional/PIBecomeApproveTest.php | 9 -- test/functional/PiBecomeRequestTest.php | 27 ---- test/functional/PiMemberApproveTest.php | 14 -- test/phpunit-bootstrap.php | 126 ++++++++++++++---- 5 files changed, 102 insertions(+), 99 deletions(-) diff --git a/test/functional/AccountDeletionRequestTest.php b/test/functional/AccountDeletionRequestTest.php index 877c6b91..5834065c 100644 --- a/test/functional/AccountDeletionRequestTest.php +++ b/test/functional/AccountDeletionRequestTest.php @@ -4,31 +4,6 @@ class AccountDeletionRequestTest extends TestCase { - private function assertNumberAccountDeletionRequests(int $x) - { - global $USER, $SQL; - if ($x == 0) { - $this->assertFalse($USER->hasRequestedAccountDeletion()); - $this->assertFalse($SQL->accDeletionRequestExists($USER->uid)); - } elseif ($x > 0) { - $this->assertTrue($USER->hasRequestedAccountDeletion()); - $this->assertTrue($SQL->accDeletionRequestExists($USER->uid)); - } else { - throw new RuntimeException("x must not be negative"); - } - $this->assertEquals($x, $this->getNumberAccountDeletionRequests()); - } - - private function getNumberAccountDeletionRequests() - { - global $USER, $SQL; - $stmt = $SQL->getConn()->prepare("SELECT * FROM account_deletion_requests WHERE uid=:uid"); - $uid = $USER->uid; - $stmt->bindParam(":uid", $uid); - $stmt->execute(); - return count($stmt->fetchAll()); - } - public function testRequestAccountDeletionUserHasNoGroups() { global $USER, $SQL; diff --git a/test/functional/PIBecomeApproveTest.php b/test/functional/PIBecomeApproveTest.php index 8ac7b019..70caab20 100644 --- a/test/functional/PIBecomeApproveTest.php +++ b/test/functional/PIBecomeApproveTest.php @@ -6,15 +6,6 @@ class PIBecomeApproveTest extends TestCase { - private function assertRequestedPIGroup(bool $expected) - { - global $USER, $SQL; - $this->assertEquals( - $expected, - $SQL->requestExists($USER->uid, UnitySQL::REQUEST_BECOME_PI), - ); - } - private function requestGroupCreation() { http_post(__DIR__ . "/../../webroot/panel/account.php", [ diff --git a/test/functional/PiBecomeRequestTest.php b/test/functional/PiBecomeRequestTest.php index 69dc69e5..1ca1cf4a 100644 --- a/test/functional/PiBecomeRequestTest.php +++ b/test/functional/PiBecomeRequestTest.php @@ -5,33 +5,6 @@ class PIBecomeRequestTest extends TestCase { - private function assertNumberPiBecomeRequests(int $x) - { - global $USER, $SQL; - if ($x == 0) { - $this->assertFalse($SQL->requestExists($USER->uid, UnitySQL::REQUEST_BECOME_PI)); - } elseif ($x > 0) { - $this->assertTrue($SQL->requestExists($USER->uid, UnitySQL::REQUEST_BECOME_PI)); - } else { - throw new RuntimeException("x must not be negative"); - } - $this->assertEquals($x, $this->getNumberPiBecomeRequests()); - } - - private function getNumberPiBecomeRequests() - { - global $USER, $SQL; - // FIXME table name, "admin" are private constants in UnitySQL - // FIXME "admin" should be something else - $stmt = $SQL - ->getConn() - ->prepare("SELECT * FROM requests WHERE uid=:uid and request_for='admin'"); - $uid = $USER->uid; - $stmt->bindParam(":uid", $uid); - $stmt->execute(); - return count($stmt->fetchAll()); - } - public function testRequestBecomePi() { global $USER, $SQL; diff --git a/test/functional/PiMemberApproveTest.php b/test/functional/PiMemberApproveTest.php index 4dfd6d4e..7df223d6 100644 --- a/test/functional/PiMemberApproveTest.php +++ b/test/functional/PiMemberApproveTest.php @@ -6,20 +6,6 @@ class PIMemberApproveTest extends TestCase { - private function assertGroupMembers(UnityGroup $group, array $expected_members) - { - sort($expected_members); - $found_members = $group->getGroupMemberUIDs(); - sort($found_members); - $this->assertEqualsCanonicalizing($expected_members, $found_members); - } - - private function assertRequestedMembership(bool $expected, string $gid) - { - global $USER, $SQL; - $this->assertEquals($expected, $SQL->requestExists($USER->uid, $gid)); - } - private function requestGroupMembership(string $gid_or_mail) { http_post(__DIR__ . "/../../webroot/panel/groups.php", [ diff --git a/test/phpunit-bootstrap.php b/test/phpunit-bootstrap.php index 8ca38744..a436bb04 100644 --- a/test/phpunit-bootstrap.php +++ b/test/phpunit-bootstrap.php @@ -26,6 +26,7 @@ use UnityWebPortal\lib\UnityGroup; use UnityWebPortal\lib\UnityHTTPD; +use UnityWebPortal\lib\UnitySQL; use UnityWebPortal\lib\UnityHTTPDMessageLevel; use PHPUnit\Framework\TestCase; @@ -323,28 +324,105 @@ function getAdminUser() return ["user1@org1.test", "foo", "bar", "user1@org1.test"]; } -function assertMessageExists( - TestCase $test_case, - UnityHTTPDMessageLevel $level, - string $title_regex, - string $body_regex, -) { - $messages = UnityHTTPD::getMessages(); - $error_msg = sprintf( - "message(level='%s' title_regex='%s' body_regex='%s'), not found. found messages: %s", - $level->value, - $title_regex, - $body_regex, - jsonEncode($messages), - ); - $messages_with_title = array_filter($messages, fn($x) => preg_match($title_regex, $x[0])); - $messages_with_title_and_body = array_filter( - $messages_with_title, - fn($x) => preg_match($body_regex, $x[1]), - ); - $messages_with_title_and_body_and_level = array_filter( - $messages_with_title_and_body, - fn($x) => $x[2] == $level, - ); - $test_case->assertNotEmpty($messages_with_title_and_body_and_level, $error_msg); +class UnityWebPortalTestCase extends TestCase +{ + private function assertMessageExists( + UnityHTTPDMessageLevel $level, + string $title_regex, + string $body_regex, + ) { + $messages = UnityHTTPD::getMessages(); + $error_msg = sprintf( + "message(level='%s' title_regex='%s' body_regex='%s'), not found. found messages: %s", + $level->value, + $title_regex, + $body_regex, + jsonEncode($messages), + ); + $messages_with_title = array_filter($messages, fn($x) => preg_match($title_regex, $x[0])); + $messages_with_title_and_body = array_filter( + $messages_with_title, + fn($x) => preg_match($body_regex, $x[1]), + ); + $messages_with_title_and_body_and_level = array_filter( + $messages_with_title_and_body, + fn($x) => $x[2] == $level, + ); + $this->assertNotEmpty($messages_with_title_and_body_and_level, $error_msg); + } + + private function assertGroupMembers(UnityGroup $group, array $expected_members) + { + sort($expected_members); + $found_members = $group->getGroupMemberUIDs(); + sort($found_members); + $this->assertEqualsCanonicalizing($expected_members, $found_members); + } + + private function assertRequestedMembership(bool $expected, string $gid) + { + global $USER, $SQL; + $this->assertEquals($expected, $SQL->requestExists($USER->uid, $gid)); + } + + private function getNumberAccountDeletionRequests() + { + global $USER, $SQL; + $stmt = $SQL->getConn()->prepare("SELECT * FROM account_deletion_requests WHERE uid=:uid"); + $uid = $USER->uid; + $stmt->bindParam(":uid", $uid); + $stmt->execute(); + return count($stmt->fetchAll()); + } + + private function assertNumberAccountDeletionRequests(int $x) + { + global $USER, $SQL; + if ($x == 0) { + $this->assertFalse($USER->hasRequestedAccountDeletion()); + $this->assertFalse($SQL->accDeletionRequestExists($USER->uid)); + } elseif ($x > 0) { + $this->assertTrue($USER->hasRequestedAccountDeletion()); + $this->assertTrue($SQL->accDeletionRequestExists($USER->uid)); + } else { + throw new RuntimeException("x must not be negative"); + } + $this->assertEquals($x, $this->getNumberAccountDeletionRequests()); + } + + private function assertRequestedPIGroup(bool $expected) + { + global $USER, $SQL; + $this->assertEquals( + $expected, + $SQL->requestExists($USER->uid, UnitySQL::REQUEST_BECOME_PI), + ); + } + + private function getNumberPiBecomeRequests() + { + global $USER, $SQL; + // FIXME table name, "admin" are private constants in UnitySQL + // FIXME "admin" should be something else + $stmt = $SQL + ->getConn() + ->prepare("SELECT * FROM requests WHERE uid=:uid and request_for='admin'"); + $uid = $USER->uid; + $stmt->bindParam(":uid", $uid); + $stmt->execute(); + return count($stmt->fetchAll()); + } + + private function assertNumberPiBecomeRequests(int $x) + { + global $USER, $SQL; + if ($x == 0) { + $this->assertFalse($SQL->requestExists($USER->uid, UnitySQL::REQUEST_BECOME_PI)); + } elseif ($x > 0) { + $this->assertTrue($SQL->requestExists($USER->uid, UnitySQL::REQUEST_BECOME_PI)); + } else { + throw new RuntimeException("x must not be negative"); + } + $this->assertEquals($x, $this->getNumberPiBecomeRequests()); + } } From 13dea0bf06c941cc3f963ae21b981cf87ed5261c Mon Sep 17 00:00:00 2001 From: Simon Leary Date: Fri, 12 Dec 2025 10:05:45 -0500 Subject: [PATCH 2/6] all test cases extend base class --- test/functional/AccountDeletionRequestTest.php | 2 +- test/functional/InvalidEPPNTest.php | 2 +- test/functional/LoginShellSetTest.php | 2 +- test/functional/PIBecomeApproveTest.php | 2 +- test/functional/PIMemberRequestTest.php | 2 +- test/functional/PageLoadTest.php | 2 +- test/functional/PiBecomeRequestTest.php | 2 +- test/functional/PiMemberApproveTest.php | 2 +- test/functional/PiMemberDenyTest.php | 2 +- test/functional/PiRemoveUserTest.php | 2 +- test/functional/RegisterUserTest.php | 2 +- test/functional/SSHKeyAddTest.php | 2 +- test/functional/SSHKeyDeleteTest.php | 2 +- test/functional/ViewAsUserTest.php | 2 +- test/unit/AjaxSshValidateTest.php | 2 +- test/unit/UnityGithubTest.php | 2 +- test/unit/UnitySSOTest.php | 2 +- test/unit/UtilsTest.php | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/test/functional/AccountDeletionRequestTest.php b/test/functional/AccountDeletionRequestTest.php index 5834065c..3b040801 100644 --- a/test/functional/AccountDeletionRequestTest.php +++ b/test/functional/AccountDeletionRequestTest.php @@ -2,7 +2,7 @@ use PHPUnit\Framework\TestCase; -class AccountDeletionRequestTest extends TestCase +class AccountDeletionRequestTest extends UnityWebPortalTestCase { public function testRequestAccountDeletionUserHasNoGroups() { diff --git a/test/functional/InvalidEPPNTest.php b/test/functional/InvalidEPPNTest.php index 40cc454d..9fced79b 100644 --- a/test/functional/InvalidEPPNTest.php +++ b/test/functional/InvalidEPPNTest.php @@ -4,7 +4,7 @@ use PHPUnit\Framework\TestCase; use PHPUnit\Framework\Attributes\DataProvider; -class InvalidEPPNTest extends TestCase +class InvalidEPPNTest extends UnityWebPortalTestCase { public static function provider() { diff --git a/test/functional/LoginShellSetTest.php b/test/functional/LoginShellSetTest.php index 97e17c74..d684aeb3 100644 --- a/test/functional/LoginShellSetTest.php +++ b/test/functional/LoginShellSetTest.php @@ -3,7 +3,7 @@ use PHPUnit\Framework\TestCase; use PHPUnit\Framework\Attributes\DataProvider; -class LoginShellSetTest extends TestCase +class LoginShellSetTest extends UnityWebPortalTestCase { private static $_initialLoginShell; diff --git a/test/functional/PIBecomeApproveTest.php b/test/functional/PIBecomeApproveTest.php index 70caab20..8cc909cf 100644 --- a/test/functional/PIBecomeApproveTest.php +++ b/test/functional/PIBecomeApproveTest.php @@ -4,7 +4,7 @@ use UnityWebPortal\lib\UnityOrg; use UnityWebPortal\lib\UnitySQL; -class PIBecomeApproveTest extends TestCase +class PIBecomeApproveTest extends UnityWebPortalTestCase { private function requestGroupCreation() { diff --git a/test/functional/PIMemberRequestTest.php b/test/functional/PIMemberRequestTest.php index a4bb3826..99f6b25b 100644 --- a/test/functional/PIMemberRequestTest.php +++ b/test/functional/PIMemberRequestTest.php @@ -5,7 +5,7 @@ use UnityWebPortal\lib\UnitySQL; use UnityWebPortal\lib\UnityHTTPD; -class PIMemberRequestTest extends TestCase +class PIMemberRequestTest extends UnityWebPortalTestCase { private function requestMembership(string $gid_or_mail) { diff --git a/test/functional/PageLoadTest.php b/test/functional/PageLoadTest.php index 646620b4..4b8a9996 100644 --- a/test/functional/PageLoadTest.php +++ b/test/functional/PageLoadTest.php @@ -3,7 +3,7 @@ use PHPUnit\Framework\TestCase; use PHPUnit\Framework\Attributes\DataProvider; -class PageLoadTest extends TestCase +class PageLoadTest extends UnityWebPortalTestCase { public static function provider() { diff --git a/test/functional/PiBecomeRequestTest.php b/test/functional/PiBecomeRequestTest.php index 1ca1cf4a..b5ec991b 100644 --- a/test/functional/PiBecomeRequestTest.php +++ b/test/functional/PiBecomeRequestTest.php @@ -3,7 +3,7 @@ use PHPUnit\Framework\TestCase; use UnityWebPortal\lib\UnitySQL; -class PIBecomeRequestTest extends TestCase +class PIBecomeRequestTest extends UnityWebPortalTestCase { public function testRequestBecomePi() { diff --git a/test/functional/PiMemberApproveTest.php b/test/functional/PiMemberApproveTest.php index 7df223d6..73050966 100644 --- a/test/functional/PiMemberApproveTest.php +++ b/test/functional/PiMemberApproveTest.php @@ -4,7 +4,7 @@ use UnityWebPortal\lib\UnitySQL; use UnityWebPortal\lib\UnityGroup; -class PIMemberApproveTest extends TestCase +class PIMemberApproveTest extends UnityWebPortalTestCase { private function requestGroupMembership(string $gid_or_mail) { diff --git a/test/functional/PiMemberDenyTest.php b/test/functional/PiMemberDenyTest.php index be8f5c81..0e66cd68 100644 --- a/test/functional/PiMemberDenyTest.php +++ b/test/functional/PiMemberDenyTest.php @@ -5,7 +5,7 @@ use UnityWebPortal\lib\UnityUser; use function PHPUnit\Framework\assertEquals; -class PIMemberDenyTest extends TestCase +class PIMemberDenyTest extends UnityWebPortalTestCase { static $requestUid; diff --git a/test/functional/PiRemoveUserTest.php b/test/functional/PiRemoveUserTest.php index 254600cd..44cd3754 100644 --- a/test/functional/PiRemoveUserTest.php +++ b/test/functional/PiRemoveUserTest.php @@ -4,7 +4,7 @@ use PHPUnit\Framework\Attributes\DataProvider; use UnityWebPortal\lib\UnityUser; -class PIRemoveUserTest extends TestCase +class PIRemoveUserTest extends UnityWebPortalTestCase { private function removeUser(string $uid) { diff --git a/test/functional/RegisterUserTest.php b/test/functional/RegisterUserTest.php index a98230c8..d3d36856 100644 --- a/test/functional/RegisterUserTest.php +++ b/test/functional/RegisterUserTest.php @@ -4,7 +4,7 @@ use PHPUnit\Framework\Attributes\DataProvider; use UnityWebPortal\lib\UnityOrg; -class RegisterUserTest extends TestCase +class RegisterUserTest extends UnityWebPortalTestCase { public static function provider() { diff --git a/test/functional/SSHKeyAddTest.php b/test/functional/SSHKeyAddTest.php index 5060b67a..47c6bfce 100644 --- a/test/functional/SSHKeyAddTest.php +++ b/test/functional/SSHKeyAddTest.php @@ -5,7 +5,7 @@ use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\MockObject\MockBuilder; -class SSHKeyAddTest extends TestCase +class SSHKeyAddTest extends UnityWebPortalTestCase { private function addSshKeysPaste(array $keys): void { diff --git a/test/functional/SSHKeyDeleteTest.php b/test/functional/SSHKeyDeleteTest.php index b45f2a37..2e3ebef1 100644 --- a/test/functional/SSHKeyDeleteTest.php +++ b/test/functional/SSHKeyDeleteTest.php @@ -3,7 +3,7 @@ use PHPUnit\Framework\TestCase; use PHPUnit\Framework\Attributes\DataProvider; -class SSHKeyDeleteTest extends TestCase +class SSHKeyDeleteTest extends UnityWebPortalTestCase { static $initialKeys; diff --git a/test/functional/ViewAsUserTest.php b/test/functional/ViewAsUserTest.php index a4195e0d..c8094f4e 100644 --- a/test/functional/ViewAsUserTest.php +++ b/test/functional/ViewAsUserTest.php @@ -3,7 +3,7 @@ use UnityWebPortal\lib\UnityHTTPD; use PHPUnit\Framework\TestCase; -class ViewAsUserTest extends TestCase +class ViewAsUserTest extends UnityWebPortalTestCase { public function _testViewAsUser(array $beforeUser, array $afterUser) { diff --git a/test/unit/AjaxSshValidateTest.php b/test/unit/AjaxSshValidateTest.php index e22cb0b2..a30ba41d 100644 --- a/test/unit/AjaxSshValidateTest.php +++ b/test/unit/AjaxSshValidateTest.php @@ -5,7 +5,7 @@ use PHPUnit\Framework\TestCase; use PHPUnit\Framework\Attributes\DataProvider; -class AjaxSshValidateTest extends TestCase +class AjaxSshValidateTest extends UnityWebPortalTestCase { public static function providerTestSshValidate() { diff --git a/test/unit/UnityGithubTest.php b/test/unit/UnityGithubTest.php index 57cd5f8f..31a17135 100644 --- a/test/unit/UnityGithubTest.php +++ b/test/unit/UnityGithubTest.php @@ -5,7 +5,7 @@ use PHPUnit\Framework\TestCase; use PHPUnit\Framework\Attributes\DataProvider; -class UnityGithubTest extends TestCase +class UnityGithubTest extends UnityWebPortalTestCase { public static function providerTestGetGithubKeys() { diff --git a/test/unit/UnitySSOTest.php b/test/unit/UnitySSOTest.php index bb4ae3aa..a5881546 100644 --- a/test/unit/UnitySSOTest.php +++ b/test/unit/UnitySSOTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -class UnitySSOTest extends TestCase +class UnitySSOTest extends UnityWebPortalTestCase { public function testMultipleAttributeValues() { diff --git a/test/unit/UtilsTest.php b/test/unit/UtilsTest.php index 3644afd3..4a814054 100644 --- a/test/unit/UtilsTest.php +++ b/test/unit/UtilsTest.php @@ -4,7 +4,7 @@ use PHPUnit\Framework\TestCase; use PHPUnit\Framework\Attributes\DataProvider; -class UtilsTest extends TestCase +class UtilsTest extends UnityWebPortalTestCase { public static function SSHKeyProvider() { From aeabdd503af12afb841859aa483d9d51f5041b0a Mon Sep 17 00:00:00 2001 From: Simon Leary Date: Fri, 12 Dec 2025 10:06:23 -0500 Subject: [PATCH 3/6] remove namespaces --- test/unit/AjaxSshValidateTest.php | 2 -- test/unit/UnityGithubTest.php | 3 +-- test/unit/UnitySSOTest.php | 3 +-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/test/unit/AjaxSshValidateTest.php b/test/unit/AjaxSshValidateTest.php index a30ba41d..bf521055 100644 --- a/test/unit/AjaxSshValidateTest.php +++ b/test/unit/AjaxSshValidateTest.php @@ -1,7 +1,5 @@ Date: Fri, 12 Dec 2025 10:07:10 -0500 Subject: [PATCH 4/6] public --- test/phpunit-bootstrap.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/phpunit-bootstrap.php b/test/phpunit-bootstrap.php index a436bb04..3061f59f 100644 --- a/test/phpunit-bootstrap.php +++ b/test/phpunit-bootstrap.php @@ -326,7 +326,7 @@ function getAdminUser() class UnityWebPortalTestCase extends TestCase { - private function assertMessageExists( + public function assertMessageExists( UnityHTTPDMessageLevel $level, string $title_regex, string $body_regex, @@ -351,7 +351,7 @@ private function assertMessageExists( $this->assertNotEmpty($messages_with_title_and_body_and_level, $error_msg); } - private function assertGroupMembers(UnityGroup $group, array $expected_members) + public function assertGroupMembers(UnityGroup $group, array $expected_members) { sort($expected_members); $found_members = $group->getGroupMemberUIDs(); @@ -359,13 +359,13 @@ private function assertGroupMembers(UnityGroup $group, array $expected_members) $this->assertEqualsCanonicalizing($expected_members, $found_members); } - private function assertRequestedMembership(bool $expected, string $gid) + public function assertRequestedMembership(bool $expected, string $gid) { global $USER, $SQL; $this->assertEquals($expected, $SQL->requestExists($USER->uid, $gid)); } - private function getNumberAccountDeletionRequests() + public function getNumberAccountDeletionRequests() { global $USER, $SQL; $stmt = $SQL->getConn()->prepare("SELECT * FROM account_deletion_requests WHERE uid=:uid"); @@ -375,7 +375,7 @@ private function getNumberAccountDeletionRequests() return count($stmt->fetchAll()); } - private function assertNumberAccountDeletionRequests(int $x) + public function assertNumberAccountDeletionRequests(int $x) { global $USER, $SQL; if ($x == 0) { @@ -390,7 +390,7 @@ private function assertNumberAccountDeletionRequests(int $x) $this->assertEquals($x, $this->getNumberAccountDeletionRequests()); } - private function assertRequestedPIGroup(bool $expected) + public function assertRequestedPIGroup(bool $expected) { global $USER, $SQL; $this->assertEquals( @@ -399,10 +399,10 @@ private function assertRequestedPIGroup(bool $expected) ); } - private function getNumberPiBecomeRequests() + public function getNumberPiBecomeRequests() { global $USER, $SQL; - // FIXME table name, "admin" are private constants in UnitySQL + // FIXME table name, "admin" are public constants in UnitySQL // FIXME "admin" should be something else $stmt = $SQL ->getConn() @@ -413,7 +413,7 @@ private function getNumberPiBecomeRequests() return count($stmt->fetchAll()); } - private function assertNumberPiBecomeRequests(int $x) + public function assertNumberPiBecomeRequests(int $x) { global $USER, $SQL; if ($x == 0) { From d9edce2bfaf5a0d23d1f2ab1ba093eb06e3808c9 Mon Sep 17 00:00:00 2001 From: Simon Leary Date: Fri, 12 Dec 2025 10:07:35 -0500 Subject: [PATCH 5/6] fix assertMessageExists --- test/functional/PIMemberRequestTest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/functional/PIMemberRequestTest.php b/test/functional/PIMemberRequestTest.php index 99f6b25b..e517091d 100644 --- a/test/functional/PIMemberRequestTest.php +++ b/test/functional/PIMemberRequestTest.php @@ -47,8 +47,7 @@ public function testRequestMembership() $this->assertFalse($SQL->requestExists($uid, $gid)); UnityHTTPD::clearMessages(); $this->requestMembership("asdlkjasldkj"); - assertMessageExists( - $this, + $this->assertMessageExists( UnityHTTPDMessageLevel::ERROR, "/.*/", "/^This PI doesn't exist$/", From 5160ce0df455764b8c191cfbcc9741bd4042d3a5 Mon Sep 17 00:00:00 2001 From: Simon Leary Date: Fri, 12 Dec 2025 10:08:17 -0500 Subject: [PATCH 6/6] remove unused imports --- test/functional/AccountDeletionRequestTest.php | 2 -- test/functional/InvalidEPPNTest.php | 1 - test/functional/LoginShellSetTest.php | 1 - test/functional/PIBecomeApproveTest.php | 1 - test/functional/PIMemberRequestTest.php | 1 - test/functional/PageLoadTest.php | 1 - test/functional/PiBecomeRequestTest.php | 1 - test/functional/PiMemberApproveTest.php | 1 - test/functional/PiMemberDenyTest.php | 1 - test/functional/PiRemoveUserTest.php | 1 - test/functional/RegisterUserTest.php | 1 - test/functional/SSHKeyAddTest.php | 1 - test/functional/SSHKeyDeleteTest.php | 1 - test/functional/ViewAsUserTest.php | 1 - test/unit/AjaxSshValidateTest.php | 1 - test/unit/UnityGithubTest.php | 1 - test/unit/UnitySSOTest.php | 1 - test/unit/UtilsTest.php | 1 - 18 files changed, 19 deletions(-) diff --git a/test/functional/AccountDeletionRequestTest.php b/test/functional/AccountDeletionRequestTest.php index 3b040801..1c7c33b9 100644 --- a/test/functional/AccountDeletionRequestTest.php +++ b/test/functional/AccountDeletionRequestTest.php @@ -1,7 +1,5 @@