public function AccessUnpublishedTokenSetTest::testUnpublishedRouteLoad in Access unpublished 8
@covers \Drupal\access_unpublished\Plugin\GraphQL\DataProducer\AccessUnpublishedTokenSet::resolve
File
- tests/
src/ Kernel/ graphql/ DataProducer/ AccessUnpublishedTokenSetTest.php, line 23
Class
- AccessUnpublishedTokenSetTest
- Data producers AccessUnpublishedTokenSet test class.
Namespace
Drupal\Tests\access_unpublished\Kernel\graphql\DataProducerCode
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());
}