You are here

public function ModuleVersionTest::testInvalidBranchCorePrefix in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/update/tests/src/Unit/ModuleVersionTest.php \Drupal\Tests\update\Unit\ModuleVersionTest::testInvalidBranchCorePrefix()

@covers ::createFromSupportBranch

@dataProvider providerInvalidBranchCorePrefix

Parameters

string $branch: The branch to test.

File

core/modules/update/tests/src/Unit/ModuleVersionTest.php, line 282

Class

ModuleVersionTest
@coversDefaultClass \Drupal\update\ModuleVersion

Namespace

Drupal\Tests\update\Unit

Code

public function testInvalidBranchCorePrefix($branch) {
  $this
    ->expectException(\UnexpectedValueException::class);
  $this
    ->expectExceptionMessage("Unexpected version core prefix in {$branch}0. The only core prefix expected in \\Drupal\\update\\ModuleVersion is: 8.x-");
  ModuleVersion::createFromSupportBranch($branch);
}