You are here

public function ProjectInfoTraitTest::testTrait in Automatic Updates 8

@covers ::getExtensionVersion @covers ::getProjectName @dataProvider providerInfos

File

tests/src/Kernel/ProjectInfoTraitTest.php, line 26

Class

ProjectInfoTraitTest
@coversDefaultClass \Drupal\automatic_updates\ProjectInfoTrait @group automatic_updates

Namespace

Drupal\Tests\automatic_updates\Kernel

Code

public function testTrait($expected, $info, $extension_name) {
  $class = new ProjectInfoTestClass();
  $project_name = $class
    ->getProjectName($extension_name, $info);
  $this
    ->assertSame($expected['project'], $project_name);
  $this
    ->assertSame($expected['version'], $class
    ->getExtensionVersion($info + [
    'project' => $project_name,
  ]));
}