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

AuthOptionsTest::testAuthOptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 13
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 8
nc 1
nop 0
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
}