You are here

public function ExtensionVersionTest::testInvalidVersionNumber in Drupal 10

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Extension/ExtensionVersionTest.php \Drupal\Tests\Core\Extension\ExtensionVersionTest::testInvalidVersionNumber()

@covers ::createFromVersionString

@dataProvider providerInvalidVersionNumber

Parameters

string $version: The version string to test.

File

core/tests/Drupal/Tests/Core/Extension/ExtensionVersionTest.php, line 252

Class

ExtensionVersionTest
@coversDefaultClass \Drupal\Core\Extension\ExtensionVersion

Namespace

Drupal\Tests\Core\Extension

Code

public function testInvalidVersionNumber(string $version) : void {
  $this
    ->expectException(\UnexpectedValueException::class);
  $this
    ->expectExceptionMessage("Unexpected version number in: {$version}");
  ExtensionVersion::createFromVersionString($version);
}