Code Duplication    Length = 17-17 lines in 2 locations

tests/unit/JWTAuthenticationHandlerTest.php 1 location

@@ 23-39 (lines=17) @@
20
21
    protected $token;
22
23
    public function setUp()
24
    {
25
        Environment::putEnv('JWT_SIGNER_KEY=test_signer');
26
27
        parent::setUp();
28
        $this->member = $this->objFromFixture(Member::class, 'admin');
29
        $createToken = Injector::inst()->get(CreateTokenMutationCreator::class);
30
31
        $response = $createToken->resolve(
32
            null,
33
            ['Email' => '[email protected]', 'Password' => 'error'],
34
            [],
35
            new ResolveInfo([])
36
        );
37
38
        $this->token = $response->Token;
39
    }
40
41
    public function tearDown()
42
    {

tests/unit/ValidateTokenQueryCreatorTest.php 1 location

@@ 27-43 (lines=17) @@
24
25
    protected $token;
26
27
    public function setUp()
28
    {
29
        Environment::putEnv('JWT_SIGNER_KEY=test_signer');
30
31
        parent::setUp();
32
        $this->member = $this->objFromFixture(Member::class, 'admin');
33
        $createToken = Injector::inst()->get(CreateTokenMutationCreator::class);
34
35
        $response = $createToken->resolve(
36
            null,
37
            ['Email' => '[email protected]', 'Password' => 'error'],
38
            [],
39
            new ResolveInfo([])
40
        );
41
42
        $this->token = $response->Token;
43
    }
44
45
    public function tearDown()
46
    {