Skip to content

Commit

Permalink
Convert TableNode hash into a Drupal language mock object
Browse files Browse the repository at this point in the history
  • Loading branch information
ademarco authored and pfrenssen committed Jun 26, 2015
1 parent 9e33087 commit 509b145
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Drupal/DrupalExtension/Context/DrupalContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,11 @@ public function createTerms($vocabulary, TableNode $termsTable) {
* The table listing languages by their ISO code.
*/
public function createLanguages(TableNode $langcodesTable) {
foreach ($langcodesTable->getHash() as $langcode) {
$this->languageCreate((object) $langcode);
foreach ($langcodesTable->getHash() as $row) {
$language = (object) array(
'langcode' => $row['languages'],
);
$this->languageCreate($language);
}
}

Expand Down

0 comments on commit 509b145

Please sign in to comment.