Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / drupal / drupal-extension / src / Drupal / DrupalExtension / Context / ContextClass / ClassGenerator.php
diff --git a/vendor/drupal/drupal-extension/src/Drupal/DrupalExtension/Context/ContextClass/ClassGenerator.php b/vendor/drupal/drupal-extension/src/Drupal/DrupalExtension/Context/ContextClass/ClassGenerator.php
deleted file mode 100644 (file)
index fe2d7bd..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-
-namespace Drupal\DrupalExtension\Context\ContextClass;
-
-use Behat\Behat\Context\ContextClass\ClassGenerator as BehatClassGenerator;
-use Behat\Testwork\Suite\Suite;
-
-/**
- * Generates a starting class that extends the RawDrupalContext.
- */
-class ClassGenerator implements BehatClassGenerator {
-
-  /**
-   * @var string
-   */
-  protected static $template = <<<'PHP'
-<?php
-
-{namespace}use Drupal\DrupalExtension\Context\RawDrupalContext;
-use Behat\Behat\Context\SnippetAcceptingContext;
-use Behat\Gherkin\Node\PyStringNode;
-use Behat\Gherkin\Node\TableNode;
-use Behat\Behat\Tester\Exception\PendingException;
-
-/**
- * Defines application features from the specific context.
- */
-class {className} extends RawDrupalContext implements SnippetAcceptingContext {
-
-  /**
-   * Initializes context.
-   *
-   * Every scenario gets its own context instance.
-   * You can also pass arbitrary arguments to the
-   * context constructor through behat.yml.
-   */
-  public function __construct() {
-  }
-
-}
-
-PHP;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function supportsSuiteAndClass(Suite $suite, $contextClass) {
-    return TRUE;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function generateClass(Suite $suite, $contextClass) {
-    $fqn = $contextClass;
-
-    $namespace = '';
-    if (false !== $pos = strrpos($fqn, '\\')) {
-      $namespace = 'namespace ' . substr($fqn, 0, $pos) . ";\n\n";
-      $contextClass = substr($fqn, $pos + 1);
-    }
-
-    return strtr(
-      static::$template,
-      array(
-        '{namespace}' => $namespace,
-        '{className}' => $contextClass,
-      )
-    );
-  }
-}