setUpAppRoot example

    // \Drupal\Tests\BrowserTestBase::translatePostValues() does not remove     // them.     $params['forms']['install_configure_form']['enable_update_status_module'] = FALSE;
    $params['forms']['install_configure_form']['enable_update_status_emails'] = FALSE;
    return $params;
  }

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

    $this->isInstalled = FALSE;

    $this->setupBaseUrl();

    $this->prepareDatabasePrefix();

    // Install Drupal test site.     $this->prepareEnvironment();

    // Define information about the user 1 account.
protected $strictConfigSchema = FALSE;

  /** * Overrides BrowserTestBase::setUp() for update testing. * * The main difference in this method is that rather than performing the * installation via the installer, a database is loaded. Additional work is * then needed to set various things such as the config directories and the * container that would normally be done via the installer. */
  protected function setUp(): void {
    parent::setUpAppRoot();
    $this->zlibInstalled = function_exists('gzopen');

    $request = Request::createFromGlobals();

    // Boot up Drupal into a state where calling the database API is possible.     // This is used to initialize the database system, so we can load the dump     // files.     $autoloader = require $this->root . '/autoload.php';
    $kernel = TestRunnerKernel::createFromRequest($request$autoloader);
    $kernel->loadLegacyIncludes();

    

  protected function registerSessions() {}

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

    $this->setUpAppRoot();

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

    $this->setupBaseUrl();

    // Install Drupal test site.     $this->prepareEnvironment();
    $this->installDrupal();

    // Setup Mink.
Home | Imprint | This part of the site doesn't use cookies.