function InstallerRedirectTraitTest::providerShouldRedirectToInstaller

Data provider for testShouldRedirectToInstaller().

Return value

array

  • Expected result from shouldRedirectToInstaller().
  • Exceptions to be handled by shouldRedirectToInstaller()
  • Whether or not there is a database connection.
  • Whether or not there is database connection info.
  • Whether or not there exists a sequences table in the database.

File

core/tests/Drupal/KernelTests/Core/Installer/InstallerRedirectTraitTest.php, line 34

Class

InstallerRedirectTraitTest
@coversDefaultClass \Drupal\Core\Installer\InstallerRedirectTrait[[api-linebreak]]

Namespace

Drupal\KernelTests\Core\Installer

Code

public static function providerShouldRedirectToInstaller() {
  return [
    [
      TRUE,
      DatabaseNotFoundException::class,
      FALSE,
      FALSE,
    ],
    [
      TRUE,
      DatabaseNotFoundException::class,
      TRUE,
      FALSE,
    ],
    [
      TRUE,
      DatabaseNotFoundException::class,
      FALSE,
      TRUE,
    ],
    [
      TRUE,
      DatabaseNotFoundException::class,
      TRUE,
      TRUE,
    ],
    [
      TRUE,
      DatabaseNotFoundException::class,
      TRUE,
      TRUE,
      FALSE,
    ],
    [
      TRUE,
      \PDOException::class,
      FALSE,
      FALSE,
    ],
    [
      TRUE,
      \PDOException::class,
      TRUE,
      FALSE,
    ],
    [
      FALSE,
      \PDOException::class,
      FALSE,
      TRUE,
    ],
    [
      FALSE,
      \PDOException::class,
      TRUE,
      TRUE,
    ],
    [
      TRUE,
      \PDOException::class,
      TRUE,
      TRUE,
      FALSE,
    ],
    [
      TRUE,
      DatabaseExceptionWrapper::class,
      FALSE,
      FALSE,
    ],
    [
      TRUE,
      DatabaseExceptionWrapper::class,
      TRUE,
      FALSE,
    ],
    [
      FALSE,
      DatabaseExceptionWrapper::class,
      FALSE,
      TRUE,
    ],
    [
      FALSE,
      DatabaseExceptionWrapper::class,
      TRUE,
      TRUE,
    ],
    [
      TRUE,
      DatabaseExceptionWrapper::class,
      TRUE,
      TRUE,
      FALSE,
    ],
    [
      TRUE,
      NotFoundHttpException::class,
      FALSE,
      FALSE,
    ],
    [
      TRUE,
      NotFoundHttpException::class,
      TRUE,
      FALSE,
    ],
    [
      FALSE,
      NotFoundHttpException::class,
      FALSE,
      TRUE,
    ],
    [
      FALSE,
      NotFoundHttpException::class,
      TRUE,
      TRUE,
    ],
    [
      TRUE,
      NotFoundHttpException::class,
      TRUE,
      TRUE,
      FALSE,
    ],
    [
      FALSE,
      \Exception::class,
      FALSE,
      FALSE,
    ],
    [
      FALSE,
      \Exception::class,
      TRUE,
      FALSE,
    ],
    [
      FALSE,
      \Exception::class,
      FALSE,
      TRUE,
    ],
    [
      FALSE,
      \Exception::class,
      TRUE,
      TRUE,
    ],
    [
      FALSE,
      \Exception::class,
      TRUE,
      TRUE,
      FALSE,
    ],
  ];
}

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