class TestPerComponentEntityDisplay

Same name and namespace in other branches
  1. 11.x core/modules/migrate/tests/src/Unit/destination/PerComponentEntityDisplayTest.php \Drupal\Tests\migrate\Unit\destination\TestPerComponentEntityDisplay
  2. 10 core/modules/migrate/tests/src/Unit/destination/PerComponentEntityDisplayTest.php \Drupal\Tests\migrate\Unit\destination\TestPerComponentEntityDisplay

Hierarchy

Expanded class hierarchy of TestPerComponentEntityDisplay

File

core/modules/migrate/tests/src/Unit/destination/PerComponentEntityDisplayTest.php, line 53

Namespace

Drupal\Tests\migrate\Unit\destination
View source
class TestPerComponentEntityDisplay extends ComponentEntityDisplayBase {
  const MODE_NAME = 'view_mode';
  protected $testValues;
  protected $entity;
  public function __construct($entity) {
    $this->entity = $entity;
  }
  protected function getEntity($entity_type, $bundle, $view_mode) {
    $this->testValues = func_get_args();
    return $this->entity;
  }
  public function getTestValues() {
    return $this->testValues;
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.