Code Duplication    Length = 53-53 lines in 4 locations

tests/Login/MobileStatusTest.php 1 location

@@ 8-60 (lines=53) @@
5
use Isign\QueryInterface;
6
use Isign\Tests\TestCase;
7
8
class MobileStatusTest extends TestCase
9
{
10
    private $method;
11
12
    public function setUp()
13
    {
14
        $this->method = new MobileStatus('xxx');
15
    }
16
    
17
    public function testItExtendsAbstractStatusClass()
18
    {
19
        $this->assertInstanceOf('Isign\Login\AbstractStatus', $this->method);
20
    }
21
22
    public function testContainsToken()
23
    {
24
        $this->assertInstanceOf('Isign\TokenizedQueryInterface', $this->method);
25
        $this->assertSame('xxx', $this->method->getToken());
26
    }
27
28
    public function testGetFields()
29
    {
30
        $result = $this->method->getFields();
31
32
        $this->assertArrayHasKey('token', $result);
33
        $this->assertSame('xxx', $result['token']);
34
    }
35
36
    public function testGetAction()
37
    {
38
        $this->assertSame('mobile/login/status', $this->method->getAction());
39
    }
40
41
    public function testGetMethod()
42
    {
43
        $this->assertSame(QueryInterface::GET, $this->method->getMethod());
44
    }
45
46
    public function testCreateResult()
47
    {
48
        $this->assertInstanceOf('Isign\Login\MobileStatusResult', $this->method->createResult());
49
    }
50
51
    public function testHasValidationConstraints()
52
    {
53
        $collection = $this->method->getValidationConstraints();
54
55
        $this->assertInstanceOf(
56
            'Symfony\Component\Validator\Constraints\Collection',
57
            $collection
58
        );
59
    }
60
}
61

tests/Login/SmartIdStatusTest.php 1 location

@@ 8-60 (lines=53) @@
5
use Isign\QueryInterface;
6
use Isign\Tests\TestCase;
7
8
class SmartIdStatusTest extends TestCase
9
{
10
    private $method;
11
12
    public function setUp()
13
    {
14
        $this->method = new SmartIdStatus('xxx');
15
    }
16
    
17
    public function testItExtendsAbstractStatusClass()
18
    {
19
        $this->assertInstanceOf('Isign\Login\AbstractStatus', $this->method);
20
    }
21
22
    public function testContainsToken()
23
    {
24
        $this->assertInstanceOf('Isign\TokenizedQueryInterface', $this->method);
25
        $this->assertSame('xxx', $this->method->getToken());
26
    }
27
28
    public function testGetFields()
29
    {
30
        $result = $this->method->getFields();
31
32
        $this->assertArrayHasKey('token', $result);
33
        $this->assertSame('xxx', $result['token']);
34
    }
35
36
    public function testGetAction()
37
    {
38
        $this->assertSame('smartid/login/status', $this->method->getAction());
39
    }
40
41
    public function testGetMethod()
42
    {
43
        $this->assertSame(QueryInterface::GET, $this->method->getMethod());
44
    }
45
46
    public function testCreateResult()
47
    {
48
        $this->assertInstanceOf('Isign\Login\SmartIdStatusResult', $this->method->createResult());
49
    }
50
51
    public function testHasValidationConstraints()
52
    {
53
        $collection = $this->method->getValidationConstraints();
54
55
        $this->assertInstanceOf(
56
            'Symfony\Component\Validator\Constraints\Collection',
57
            $collection
58
        );
59
    }
60
}
61

tests/Sign/MobileHashStatusTest.php 1 location

@@ 8-60 (lines=53) @@
5
use Isign\Sign\MobileHashStatus;
6
use Isign\Tests\TestCase;
7
8
class MobileHashStatusTest extends TestCase
9
{
10
    private $method;
11
12
    public function setUp()
13
    {
14
        $this->method = new MobileHashStatus('xxx');
15
    }
16
17
    public function testContainsToken()
18
    {
19
        $this->assertInstanceOf('Isign\TokenizedQueryInterface', $this->method);
20
        $this->assertSame('xxx', $this->method->getToken());
21
    }
22
    
23
    public function testItExtendsAbstractStatusClass()
24
    {
25
        $this->assertInstanceOf('Isign\Login\AbstractStatus', $this->method);
26
    }
27
28
    public function testGetFields()
29
    {
30
        $result = $this->method->getFields();
31
32
        $this->assertArrayHasKey('token', $result);
33
        $this->assertSame('xxx', $result['token']);
34
    }
35
36
    public function testGetAction()
37
    {
38
        $this->assertSame('mobile/sign/hash/status', $this->method->getAction());
39
    }
40
41
    public function testGetMethod()
42
    {
43
        $this->assertSame(QueryInterface::GET, $this->method->getMethod());
44
    }
45
46
    public function testCreateResult()
47
    {
48
        $this->assertInstanceOf('Isign\Sign\MobileHashStatusResult', $this->method->createResult());
49
    }
50
51
    public function testHasValidationConstraints()
52
    {
53
        $collection = $this->method->getValidationConstraints();
54
55
        $this->assertInstanceOf(
56
            'Symfony\Component\Validator\Constraints\Collection',
57
            $collection
58
        );
59
    }
60
}
61

tests/Sign/MobileStatusTest.php 1 location

@@ 8-60 (lines=53) @@
5
use Isign\Sign\MobileStatus;
6
use Isign\Tests\TestCase;
7
8
class MobileStatusTest extends TestCase
9
{
10
    private $method;
11
12
    public function setUp()
13
    {
14
        $this->method = new MobileStatus('xxx');
15
    }
16
17
    public function testContainsToken()
18
    {
19
        $this->assertInstanceOf('Isign\TokenizedQueryInterface', $this->method);
20
        $this->assertSame('xxx', $this->method->getToken());
21
    }
22
    
23
    public function testItExtendsAbstractStatusClass()
24
    {
25
        $this->assertInstanceOf('Isign\Login\AbstractStatus', $this->method);
26
    }
27
28
    public function testGetFields()
29
    {
30
        $result = $this->method->getFields();
31
32
        $this->assertArrayHasKey('token', $result);
33
        $this->assertSame('xxx', $result['token']);
34
    }
35
36
    public function testGetAction()
37
    {
38
        $this->assertSame('mobile/sign/status', $this->method->getAction());
39
    }
40
41
    public function testGetMethod()
42
    {
43
        $this->assertSame(QueryInterface::GET, $this->method->getMethod());
44
    }
45
46
    public function testCreateResult()
47
    {
48
        $this->assertInstanceOf('Isign\Sign\MobileStatusResult', $this->method->createResult());
49
    }
50
51
    public function testHasValidationConstraints()
52
    {
53
        $collection = $this->method->getValidationConstraints();
54
55
        $this->assertInstanceOf(
56
            'Symfony\Component\Validator\Constraints\Collection',
57
            $collection
58
        );
59
    }
60
}
61