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

AuthOptionsTest::testCheckSetAndGetMethods()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.8333
c 0
b 0
f 0
cc 1
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 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