function StageCommitExceptionTest::providerCommitException

Same name and namespace in other branches
  1. main core/modules/package_manager/tests/src/Kernel/StageCommitExceptionTest.php \Drupal\Tests\package_manager\Kernel\StageCommitExceptionTest::providerCommitException()

Data provider for testCommitException().

Return value

\string[][] The test cases.

File

core/modules/package_manager/tests/src/Kernel/StageCommitExceptionTest.php, line 57

Class

StageCommitExceptionTest
Tests Drupal\package_manager\SandboxManagerBase.

Namespace

Drupal\Tests\package_manager\Kernel

Code

public static function providerCommitException() : array {
  return [
    'RuntimeException to ApplyFailedException' => [
      'RuntimeException',
      ApplyFailedException::class,
    ],
    'InvalidArgumentException' => [
      InvalidArgumentException::class,
      SandboxException::class,
    ],
    'PreconditionException' => [
      PreconditionException::class,
      SandboxException::class,
    ],
    'Exception' => [
      'Exception',
      ApplyFailedException::class,
    ],
  ];
}

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