LicenseStateChangeTest.php in Commerce License 8.2        
                          
                  
                        
  
  
  
  
File
  tests/modules/commerce_license_test/src/Plugin/Commerce/LicenseType/LicenseStateChangeTest.php
  
    View source  
  <?php
namespace Drupal\commerce_license_test\Plugin\Commerce\LicenseType;
use Drupal\commerce_license\Entity\LicenseInterface;
class LicenseStateChangeTest extends TestLicenseBase {
  
  public function grantLicense(LicenseInterface $license) {
    $state = \Drupal::state();
    $state
      ->set('commerce_license_state_change_test', 'grantLicense');
  }
  
  public function revokeLicense(LicenseInterface $license) {
    $state = \Drupal::state();
    $state
      ->set('commerce_license_state_change_test', 'revokeLicense');
  }
}