getConfigurationClasses example


  protected function assertCategories(array $migrations): void {
    foreach ($migrations as $id => $migration) {
      $object_classes = class_parents($migration->getDestinationPlugin());
      $object_classes[] = get_class($migration->getDestinationPlugin());

      // Ensure that the destination plugin is an instance of at least one of       // the expected classes.       if (in_array('Configuration', $migration->getMigrationTags(), TRUE)) {
        $this->assertNotEmpty(array_intersect($object_classes$this->getConfigurationClasses()), "The migration $id is tagged as Configuration.");
      }
      elseif (in_array('Content', $migration->getMigrationTags(), TRUE)) {
        $this->assertNotEmpty(array_intersect($object_classes$this->getContentClasses()), "The migration $id is tagged as Content.");
      }
      else {
        $this->fail("The migration $id is not tagged as either 'Content' or 'Configuration'.");
      }
    }
  }

  /** * Get configuration classes. * * Configuration migrations should have a destination plugin that is an * instance of one of the following classes. * * @return array * The configuration class names. */
Home | Imprint | This part of the site doesn't use cookies.