You are here

class AccessUnpublishedTokenSetTest in Access unpublished 8

Data producers AccessUnpublishedTokenSet test class.

@group graphql @legacy

Hierarchy

  • class \Drupal\Tests\access_unpublished\Kernel\graphql\DataProducer\AccessUnpublishedTokenSetTest extends \Drupal\Tests\graphql\Kernel\GraphQLTestBase

Expanded class hierarchy of AccessUnpublishedTokenSetTest

File

tests/src/Kernel/graphql/DataProducer/AccessUnpublishedTokenSetTest.php, line 13

Namespace

Drupal\Tests\access_unpublished\Kernel\graphql\DataProducer
View source
class AccessUnpublishedTokenSetTest extends GraphQLTestBase {

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

  /**
   * @covers \Drupal\access_unpublished\Plugin\GraphQL\DataProducer\AccessUnpublishedTokenSet::resolve
   */
  public function testUnpublishedRouteLoad() : void {
    $this
      ->assertNull(\Drupal::service('access_unpublished.token_getter')
      ->getToken());
    $this
      ->executeDataProducer('access_unpublished_token_set', [
      'token' => 'TEST',
    ]);
    $this
      ->assertEquals('TEST', \Drupal::service('access_unpublished.token_getter')
      ->getToken());
  }

}

Members