initFileCache example

/** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    // Allow tests to compare MarkupInterface objects via assertEquals().     $this->registerComparator(new MarkupInterfaceComparator());

    $this->root = static::getDrupalRoot();
    $this->initFileCache();
    $this->bootEnvironment();
    $this->bootKernel();
  }

  /** * {@inheritdoc} */
  public function __get(string $name) {
    if ($name === 'randomGenerator') {
      return Random::getGenerator();
    }
  }
Home | Imprint | This part of the site doesn't use cookies.