1 | <?php |
||
8 | * Test the JWT auth mechanism |
||
9 | * @todo: add more tests |
||
10 | * @author Christian Blank <[email protected]> |
||
11 | */ |
||
12 | class JwtAuthTest extends SapphireTest { |
||
13 | |||
14 | |||
15 | public function testJwtEncode() { |
||
27 | |||
28 | public function testJwtDecode() { |
||
29 | $token = "eyJ0eXAiOiJKV1QifQ.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.2a2f70f937182a2daa5c1e79ed832899c3ebb14412b214c0cb0484b8199b64a2"; |
||
30 | $result = JwtAuth::jwt_decode($token, "secret"); |
||
31 | $this->assertEquals("1234567890", $result['sub']); |
||
32 | $this->assertEquals(true, $result['admin']); |
||
33 | $this->assertEquals("John Doe", $result['name']); |
||
37 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.