Code Duplication    Length = 7-7 lines in 2 locations

src/Drupal/DrupalExtension/Context/MessageContext.php 1 location

@@ 248-254 (lines=7) @@
245
   * @param $name
246
   *   string CSS selector name
247
   */
248
  public function getDrupalSelector($name) {
249
    $text = $this->getDrupalParameter('selectors');
250
    if (!isset($text[$name])) {
251
      throw new \Exception(sprintf('No such selector configured: %s', $name));
252
    }
253
    return $text[$name];
254
  }
255
256
  /**
257
   * Internal callback to check for a specific message in a given context.

src/Drupal/DrupalExtension/Context/RawDrupalContext.php 1 location

@@ 147-153 (lines=7) @@
144
   * @throws \Exception
145
   * @return
146
   */
147
  public function getDrupalText($name) {
148
    $text = $this->getDrupalParameter('text');
149
    if (!isset($text[$name])) {
150
      throw new \Exception(sprintf('No such Drupal string: %s', $name));
151
    }
152
    return $text[$name];
153
  }
154
155
  /**
156
   * Get active Drupal Driver.