Completed
Push — master ( fe6d3f...aabe24 )
by ABDULMALIK
05:15 queued 01:45
created

AuthOptionsTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 16
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testAuthOptions() 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 \PHPUnit_Framework_TestCase
12
{
13
    public function testAuthOptions()
14
    {
15
        $authOptions = new AuthOptions();
16
17
        $this->assertEquals(AuthOptions::DEFAULT_VARIABLE_NAME, $authOptions->getVariableName());
18
        $this->assertEquals(AuthOptions::ATTRIBUTE_STORAGE_TYPE, $authOptions->getVariableStorageType());
19
20
        $authOptions->setVariableName('var1');
21
        $this->assertEquals('var1', $authOptions->getVariableName());
22
23
        $authOptions->setVariableStorageType(AuthOptions::COOKIE_STORAGE_TYPE);
24
        $this->assertEquals(AuthOptions::COOKIE_STORAGE_TYPE, $authOptions->getVariableStorageType());
25
    }
26
}