FunctionsTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
c 1
b 0
f 1
dl 0
loc 7
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Nip\FlashData\Tests;
4
5
use Nip\Container\Container;
6
use Nip\FlashData\FlashData;
7
use Nip\FlashData\FlashServiceProvider;
8
9
/**
10
 * Class FlashServiceProviderTest
11
 * @package Nip\Tests\FlashData
12
 */
13
class FunctionsTest extends AbstractTest
14
{
15
    public function test_flash_get()
16
    {
17
        $_SESSION[FlashData::DEFAULT_SESSION_KEY]['test'] = 'value1';
18
19
        self::assertSame('value1', \flash_get('test'));
20
    }
21
22
    protected function setUp(): void
23
    {
24
        parent::setUp();
25
26
        $provider = new FlashServiceProvider();
27
        $provider->setContainer(Container::getInstance());
28
        $provider->register();
29
    }
30
}
31