Completed
Push — master ( 884747...1c7964 )
by ABDULMALIK
11s
created

AuthOptionsTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCheckSetAndGetMethods() 0 13 1
1
<?php
2
3
namespace Tests\Unit;
4
5
use Potievdev\SlimRbac\Structure\AuthOptions;
6
7
/**
8
 * Class AuthOptionsTest
9
 * @package Tests\Unit
10
 */
11
class AuthOptionsTest extends BaseTestCase
12
{
13
    /**
14
     * Testing AuthOptionsComponent
15
     */
16
    public function testCheckSetAndGetMethods()
17
    {
18
        $authOptions = $this->createAuthOptions();
19
20
        $this->assertEquals(AuthOptions::DEFAULT_VARIABLE_NAME, $authOptions->getVariableName());
21
        $this->assertEquals(AuthOptions::ATTRIBUTE_STORAGE_TYPE, $authOptions->getVariableStorageType());
22
23
        $authOptions->setVariableName('var1');
24
        $this->assertEquals('var1', $authOptions->getVariableName());
25
26
        $authOptions->setVariableStorageType(AuthOptions::COOKIE_STORAGE_TYPE);
27
        $this->assertEquals(AuthOptions::COOKIE_STORAGE_TYPE, $authOptions->getVariableStorageType());
28
    }
29
}
30