From e57c3ec895d24084ed25f601a31c67951b1ee491 Mon Sep 17 00:00:00 2001 From: arismag <10897246+arismag@users.noreply.github.com> Date: Tue, 12 Mar 2024 15:04:30 +0200 Subject: [PATCH] Minor syntax fixes on FeatureContext.php --- tests/Behat/FeatureContext.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/Behat/FeatureContext.php b/tests/Behat/FeatureContext.php index a785dbb76..08b254d57 100644 --- a/tests/Behat/FeatureContext.php +++ b/tests/Behat/FeatureContext.php @@ -13,7 +13,6 @@ * Defines step definitions that are generally useful for the project. */ class FeatureContext extends RawDrupalContext { - /** * Checks that a 403 Access Denied error occurred. * @@ -62,6 +61,7 @@ public function createProfile($name, TableNode $usersTable) 'type' => 'member', 'uid' => key($user), ]); + // Set field values for profile. $term_ids = []; foreach ($table as $key => $value) { @@ -77,6 +77,7 @@ public function createProfile($name, TableNode $usersTable) $profile->set($key, $term_ids); } } + // Set the country and city values. $address_values = [ 'locality' => 'Mountain View', @@ -94,7 +95,6 @@ public function createProfile($name, TableNode $usersTable) * @Given there is a group with data: */ public function createGroup(TableNode $usersTable) { - // Get all values from table. $fields = $usersTable->getRow(0); $values = $usersTable->getRow(1); @@ -106,6 +106,7 @@ public function createGroup(TableNode $usersTable) { $term = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadByProperties(['name' => $topic]); $term_ids[] = key($term); } + // Create group. $group = Group::create([ 'label' => $table['title'], @@ -117,6 +118,7 @@ public function createGroup(TableNode $usersTable) { 'moderation_state' => $table['moderation_state'], 'author' => $table['author'] ]); + // Save the group entity. $group->save(); }