You are here

class UpdateSemverContribTest in Drupal 10

Same name and namespace in other branches
  1. 9 core/modules/update/tests/src/Functional/UpdateSemverContribTest.php \Drupal\Tests\update\Functional\UpdateSemverContribTest

Tests the Update Manager module with a contrib module with semver versions.

@group update

Hierarchy

  • class \Drupal\Tests\update\Functional\UpdateSemverTestBase extends \Drupal\Tests\update\Functional\UpdateTestBase uses \Drupal\Tests\Traits\Core\CronRunTrait

Expanded class hierarchy of UpdateSemverContribTest

File

core/modules/update/tests/src/Functional/UpdateSemverContribTest.php, line 10

Namespace

Drupal\Tests\update\Functional
View source
class UpdateSemverContribTest extends UpdateSemverTestBase {

  /**
   * {@inheritdoc}
   */
  protected $updateTableLocator = 'table.update:nth-of-type(2)';

  /**
   * {@inheritdoc}
   */
  protected $updateProject = 'semver_test';

  /**
   * {@inheritdoc}
   */
  protected $projectTitle = 'Semver Test';

  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'semver_test',
  ];

  /**
   * {@inheritdoc}
   */
  protected function setProjectInstalledVersion($version) {
    $system_info = [
      $this->updateProject => [
        'project' => $this->updateProject,
        'version' => $version,
        'hidden' => FALSE,
      ],
      // Ensure Drupal core on the same version for all test runs.
      'drupal' => [
        'project' => 'drupal',
        'version' => '8.0.0',
        'hidden' => FALSE,
      ],
    ];
    $this
      ->config('update_test.settings')
      ->set('system_info', $system_info)
      ->save();
  }

}

Members