private function JWKFetcherTest::getStub in Auth0 Single Sign On 8.2
Stub the JWKFetcher class.
Parameters
CacheHandler|null $cache_handler Cache handler to use or null if no cache.:
Return value
\PHPUnit_Framework_MockObject_MockObject
5 calls to JWKFetcherTest::getStub()
- JWKFetcherTest::testCacheReturn in vendor/
auth0/ auth0-php/ tests/ Helpers/ JWKFetcherTest.php - Test that the requestJwkX5c method returns a cached value, if set.
- JWKFetcherTest::testGetJwksX5cNoX5c in vendor/
auth0/ auth0-php/ tests/ Helpers/ JWKFetcherTest.php - Test that a JWK with no x509 cert returns a blank array.
- JWKFetcherTest::testGetJwksX5cWithKid in vendor/
auth0/ auth0-php/ tests/ Helpers/ JWKFetcherTest.php - Test that a standard JWKS path returns the correct x5c when given a kid.
- JWKFetcherTest::testGetJwksX5cWithoutKid in vendor/
auth0/ auth0-php/ tests/ Helpers/ JWKFetcherTest.php - Test that a standard JWKS path returns the first x5c.
- JWKFetcherTest::testGetJwksX5cWithPath in vendor/
auth0/ auth0-php/ tests/ Helpers/ JWKFetcherTest.php - Test that a custom JWKS path returns the correct JSON.
File
- vendor/
auth0/ auth0-php/ tests/ Helpers/ JWKFetcherTest.php, line 263
Class
- JWKFetcherTest
- Class JWKFetcherTest.
Namespace
Auth0\Tests\HelpersCode
private function getStub($cache_handler = null) {
$stub = $this
->getMockBuilder(JWKFetcher::class)
->setConstructorArgs([
$cache_handler,
])
->setMethods([
'requestJwks',
])
->getMock();
$stub
->method('requestJwks')
->will($this
->returnCallback([
$this,
'getLocalJwks',
]));
return $stub;
}