Passed
Push — master ( 528f97...5cd088 )
by Petr
03:27 queued 01:21
created

StoredTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 1
1
<?php
2
3
namespace BasicTests;
4
5
6
use CommonTestClass;
7
use kalanis\kw_paths\PathsException;
8
use kalanis\kw_routed_paths\RoutedPath;
9
use kalanis\kw_routed_paths\Sources\Arrays;
10
use kalanis\kw_routed_paths\StoreRouted;
11
12
13
class StoredTest extends CommonTestClass
14
{
15
    /**
16
     * @throws PathsException
17
     */
18
    public function testBasic(): void
19
    {
20
        $path = new RoutedPath(new Arrays(['user' => 'bvdbv']));
21
22
        $this->assertEmpty(StoreRouted::getPath());
23
24
        StoreRouted::init($path);
25
        $this->assertNotEmpty(StoreRouted::getPath());
26
        $xPath = StoreRouted::getPath();
27
        $this->assertEquals('bvdbv', $xPath->getUser());
28
    }
29
}
30