You are here

public function ModuleVersionTest::testInvalidBranch in Drupal 9

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

@covers ::createFromSupportBranch

@dataProvider provideInvalidBranch

Parameters

string $branch: The branch to test.

File

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

Class

ModuleVersionTest
@coversDefaultClass \Drupal\update\ModuleVersion

Namespace

Drupal\Tests\update\Unit

Code

public function testInvalidBranch($branch) {
  $this
    ->expectException(\UnexpectedValueException::class);
  $this
    ->expectExceptionMessage("Invalid support branch: {$branch}");
  ModuleVersion::createFromSupportBranch($branch);
}