public function LTIToolProviderTest::testTimestampNonceHandlerMissingNonceConsumer in LTI Tool Provider 2.x
Same name and namespace in other branches
- 8 tests/src/Unit/LTIToolProviderTest.php \Drupal\Tests\lti_tool_provider\Unit\LTIToolProviderTest::testTimestampNonceHandlerMissingNonceConsumer()
Test the timestampNonceHandler() method.
@covers ::timestampNonceHandler @covers ::__construct
File
- tests/
src/ Unit/ LTIToolProviderTest.php, line 216
Class
- LTIToolProviderTest
- LTIToolProvider unit tests.
Namespace
Drupal\Tests\lti_tool_provider\UnitCode
public function testTimestampNonceHandlerMissingNonceConsumer() {
$provider = new LTIToolProvider($this->configFactory, $this->entityTypeManager, $this->loggerFactory, $this->eventDispatcher);
$this->provider->timestamp = time();
$expected = OAUTH_BAD_NONCE;
$actual = $provider
->timestampNonceHandler($this->provider);
$this
->assertEquals($expected, $actual);
}