You are here

public function LTIToolProviderTest::testTimestampNonceHandlerMissingTimestamp in LTI Tool Provider 8

Same name and namespace in other branches
  1. 2.x tests/src/Unit/LTIToolProviderTest.php \Drupal\Tests\lti_tool_provider\Unit\LTIToolProviderTest::testTimestampNonceHandlerMissingTimestamp()

Test the timestampNonceHandler() method.

@covers ::timestampNonceHandler @covers ::__construct

File

tests/src/Unit/LTIToolProviderTest.php, line 228

Class

LTIToolProviderTest
LTIToolProvider unit tests.

Namespace

Drupal\Tests\lti_tool_provider\Unit

Code

public function testTimestampNonceHandlerMissingTimestamp() {
  $provider = new LTIToolProvider($this->configFactory, $this->entityTypeManager, $this->loggerFactory, $this->eventDispatcher);
  $expected = OAUTH_BAD_TIMESTAMP;
  $actual = $provider
    ->timestampNonceHandler($this->provider);
  $this
    ->assertEquals($expected, $actual);
}