Skip to content

Commit

Permalink
Adjust PHPUnit_Framework_Assert in user_management acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Mar 24, 2019
1 parent b831993 commit 3c69f57
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/acceptance/features/bootstrap/WebUIUsersContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public function theAdminDeletesDoesNotTheseGroupsUsingTheWebUI(TableNode $table)
*/
public function theGroupNameShouldBeListed($groupName) {
$groups = $this->usersPage->getAllGroups();
PHPUnit_Framework_Assert::assertContains(
PHPUnit\Framework\Assert::assertContains(
$groupName, $groups, "Expected '" . $groupName . "' does not exist"
);
}
Expand All @@ -241,7 +241,7 @@ public function theGroupNameShouldBeListed($groupName) {
* @return void
*/
public function theGroupNamedShouldNotBeListedOnTheWebUI($name) {
PHPUnit_Framework_Assert::assertFalse(
PHPUnit\Framework\Assert::assertFalse(
\in_array($name, $this->usersPage->getAllGroups(), true),
"group '" . $name . "' is listed but should not be"
);
Expand All @@ -262,7 +262,7 @@ public function theseGroupsShouldBeListedOnTheWebUI(
$should = ($shouldOrNot !== "not");
$groups = $this->usersPage->getAllGroups();
foreach ($table as $row) {
PHPUnit_Framework_Assert::assertEquals(
PHPUnit\Framework\Assert::assertEquals(
\in_array($row['groupname'], $groups, true),
$should,
"group '" . $row['groupname'] .
Expand Down Expand Up @@ -377,7 +377,7 @@ public function enableOrDisableSettings($action, $setting) {
*/
public function quotaOfUserShouldBeSetToOnTheWebUI($username, $quota) {
$setQuota = $this->usersPage->getQuotaOfUser($username);
PHPUnit_Framework_Assert::assertEquals(
PHPUnit\Framework\Assert::assertEquals(
$quota,
$setQuota,
'Users quota is set to "' . $setQuota .
Expand All @@ -395,7 +395,7 @@ public function quotaOfUserShouldBeSetToOnTheWebUI($username, $quota) {
public function theAdministratorShouldBeAbleToSeeEmailOfTheseUsers(TableNode $table) {
foreach ($table as $row) {
$userEmail = $this->usersPage->getEmailOfUser($row['username']);
PHPUnit_Framework_Assert::assertEquals($row['email'], $userEmail);
PHPUnit\Framework\Assert::assertEquals($row['email'], $userEmail);
}
}

Expand All @@ -409,7 +409,7 @@ public function theAdministratorShouldBeAbleToSeeEmailOfTheseUsers(TableNode $ta
public function theAdministratorShouldBeAbleToSeeQuotaOfTheseUsers(TableNode $table) {
foreach ($table as $row) {
$visible = $this->usersPage->isQuotaColumnOfUserVisible($row['username']);
PHPUnit_Framework_Assert::assertEquals(true, $visible);
PHPUnit\Framework\Assert::assertEquals(true, $visible);
}
}

Expand All @@ -423,7 +423,7 @@ public function theAdministratorShouldBeAbleToSeeQuotaOfTheseUsers(TableNode $ta
public function theAdministratorShouldNotBeAbleToSeeQuotaOfTheseUsers(TableNode $table) {
foreach ($table as $row) {
$visible = $this->usersPage->isQuotaColumnOfUserVisible($row['username']);
PHPUnit_Framework_Assert::assertEquals(false, $visible);
PHPUnit\Framework\Assert::assertEquals(false, $visible);
}
}

Expand All @@ -437,7 +437,7 @@ public function theAdministratorShouldNotBeAbleToSeeQuotaOfTheseUsers(TableNode
public function theAdministratorShouldBeAbleToSeePasswordColumnOfTheseUsers(TableNode $table) {
foreach ($table as $row) {
$visible = $this->usersPage->isPasswordColumnOfUserVisible($row['username']);
PHPUnit_Framework_Assert::assertEquals(true, $visible);
PHPUnit\Framework\Assert::assertEquals(true, $visible);
}
}

Expand All @@ -451,7 +451,7 @@ public function theAdministratorShouldBeAbleToSeePasswordColumnOfTheseUsers(Tabl
public function theAdministratorShouldNotbeAbleToSeePasswordColumnOfTheseUsers(TableNode $table) {
foreach ($table as $row) {
$visible = $this->usersPage->isPasswordColumnOfUserVisible($row['username']);
PHPUnit_Framework_Assert::assertEquals(false, $visible);
PHPUnit\Framework\Assert::assertEquals(false, $visible);
}
}

Expand All @@ -467,7 +467,7 @@ public function theAdministratorShouldBeAbleToSeeStorageLocationOfTheseUsers(
) {
foreach ($table as $row) {
$userStorageLocation = $this->usersPage->getStorageLocationOfUser($row['username']);
PHPUnit_Framework_Assert::assertContains($row['storage location'], $userStorageLocation);
PHPUnit\Framework\Assert::assertContains($row['storage location'], $userStorageLocation);
}
}

Expand All @@ -484,7 +484,7 @@ public function theAdministratorShouldBeAbleToSeeLastLoginOfTheseUsers(
foreach ($table as $row) {
$userLastLogin = $this->usersPage->getLastLoginOfUser($row['username']);

PHPUnit_Framework_Assert::assertContains($row['last login'], $userLastLogin);
PHPUnit\Framework\Assert::assertContains($row['last login'], $userLastLogin);
}
}

Expand Down

0 comments on commit 3c69f57

Please sign in to comment.