You are here

CommerceLicenseSetExpiryTest.php in Commerce License 8.2

File

tests/modules/commerce_license_set_expiry_test/src/Plugin/RecurringPeriod/CommerceLicenseSetExpiryTest.php
View source
<?php

namespace Drupal\commerce_license_set_expiry_test\Plugin\RecurringPeriod;

use Drupal\recurring_period\Plugin\RecurringPeriod\RecurringPeriodBase;

/**
 * Provides the expiry test recurring period.
 *
 * @RecurringPeriod(
 *   id = "commerce_license_set_expiry_test",
 *   label = @Translation("Set expiry test"),
 *   description = @Translation("Set expiry test"),
 * )
 */
class CommerceLicenseSetExpiryTest extends RecurringPeriodBase {

  /**
   * {@inheritdoc}
   */
  public function calculateDate(\DateTimeImmutable $start) {

    // Return a fixed date & time that we can test.
    return new \DateTimeImmutable('@12345', new \DateTimeZone('UTC'));
  }

}

Classes

Namesort descending Description
CommerceLicenseSetExpiryTest Provides the expiry test recurring period.