@@ 48-59 (lines=12) @@ | ||
45 | $simplePreAuthenticator->createToken(new Request(), 'providerKey'); |
|
46 | } |
|
47 | ||
48 | public function testCreateWithHeaderKey() |
|
49 | { |
|
50 | $request = new Request(); |
|
51 | $headerBag = new HeaderBag(); |
|
52 | $headerBag->add(['keyName' => 'abcd']); |
|
53 | $request->headers = $headerBag; |
|
54 | ||
55 | $simplePreAuthenticator = new SimplePreAuthenticator('keyName', 'header'); |
|
56 | $simplePreAuthenticator->createToken($request, $this->anything()); |
|
57 | ||
58 | $this->isInstanceOf(SimplePreAuthenticator::class); |
|
59 | } |
|
60 | ||
61 | public function testCreateWithQueryKey() |
|
62 | { |
|
@@ 61-72 (lines=12) @@ | ||
58 | $this->isInstanceOf(SimplePreAuthenticator::class); |
|
59 | } |
|
60 | ||
61 | public function testCreateWithQueryKey() |
|
62 | { |
|
63 | $request = new Request(); |
|
64 | $parameterBag = new ParameterBag(); |
|
65 | $parameterBag->add(['keyName' => 'abcd']); |
|
66 | $request->query = $parameterBag; |
|
67 | ||
68 | $simplePreAuthenticator = new SimplePreAuthenticator('keyName', 'query'); |
|
69 | $simplePreAuthenticator->createToken($request, $this->anything()); |
|
70 | ||
71 | $this->isInstanceOf(SimplePreAuthenticator::class); |
|
72 | } |
|
73 | ||
74 | public function testSupportsTokenNotIsValid() |
|
75 | { |