function ModuleVersionTest::testCreateFromSupportBranch
@covers ::createFromSupportBranch
      
    
@dataProvider providerCreateFromSupportBranch
Parameters
string $branch: The branch to test.
string $expected_major: The expected major version.
File
- 
              core/modules/ update/ tests/ src/ Unit/ ModuleVersionTest.php, line 310 
Class
- ModuleVersionTest
- @coversDefaultClass \Drupal\update\ModuleVersion[[api-linebreak]]
Namespace
Drupal\Tests\update\UnitCode
public function testCreateFromSupportBranch($branch, $expected_major) {
  $version = ModuleVersion::createFromSupportBranch($branch);
  $this->assertInstanceOf(ModuleVersion::class, $version);
  $this->assertSame($expected_major, $version->getMajorVersion());
  // Version extra can't be determined from a branch.
  $this->assertSame(NULL, $version->getVersionExtra());
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
