Passed
Push — master ( b33b8e...5acb2c )
by Gabriel
04:09
created

CanCacheTest::test_init_flagsCache()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 9
rs 10
1
<?php
2
3
namespace Nip\Records\Tests\Mapping\MappingManager;
4
5
use Nip\Records\Mapping\MappingManager;
6
use Nip\Records\Tests\AbstractTest;
7
use Nip\Records\Tests\Fixtures\Records\Books\Books;
8
9
/**
10
 * Class CanCacheTest
11
 * @package Nip\Records\Tests\Mapping\MappingManager
12
 */
13
class CanCacheTest extends AbstractTest
14
{
15
16
    public function test_init_flagsCache()
17
    {
18
        $manager = MappingManager::instance();
19
        $manager->needsCaching(false);
20
        self::assertFalse($manager->needsCaching());
21
22
        $books = Books::instance();
23
        MappingManager::for($books);
24
        self::assertTrue($manager->needsCaching());
25
    }
26
}
27