Skip to content
Snippets Groups Projects
Commit 0deca4fc authored by Claudiu Cristea's avatar Claudiu Cristea
Browse files

ISAICP-9138: Unused step definitions.

parent 85290156
No related branches found
No related tags found
1 merge request!195Release 2.1.0
......@@ -253,24 +253,4 @@ protected function getOneTimeLoginUrl(UserInterface $account): string {
])->toString();
}
/**
* Asserts list of users with the given name doesn't exist.
*
* Table format:
* | name |
* | user1 |
* | user2 |
* | user3 |
*
* @param \Behat\Gherkin\Node\TableNode $usersTable
* A table containing the usernames to check.
*
* @Then the following users should be canceled:
*/
public function assertUsersAreCanceled(TableNode $usersTable): void {
foreach ($usersTable->getHash() as $userData) {
$this->assertUserStatus($userData['name'], 'cancelled');
}
}
}
......@@ -333,28 +333,4 @@ public function assertNoTriplesOfUri(string $property, string $uri, string $grap
Assert::assertCount(0, $results, "There are triples with $property $uri in the $graph graph. Results found: " . implode(', ', $messages));
}
/**
* Asserts that there are no duplicate memberships in the database.
*
* @todo Remove this in ISAICP-8376.
*
* @Given /^there are no duplicate memberships$/
*/
public function thereAreNoDuplicateMemberships(): void {
$query = <<<SQL
SELECT uid, entity_id from og_membership
GROUP BY uid, entity_id
HAVING COUNT(*) > 1
SQL;
$connection = \Drupal::getContainer()->get('database');
$results = $connection->query($query);
$messages = [];
foreach ($results as $result) {
$messages[] = sprintf('%s %s', $result->uid, $result->entity_id);
}
Assert::assertCount(0, $results, "There are duplicate memberships in the database. Results found: " . implode(', ', $messages));
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment