function ModuleVersionTest::testInvalidBranchCorePrefix

Same name 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);
}

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