Passed
Pull Request — master (#186)
by Jesús
06:27 queued 03:12
created

test_custom_no_caching_dir()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 7
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Feature\Framework\CustomNoCacheDirectory;
6
7
use Gacela\Framework\Bootstrap\GacelaConfig;
8
use Gacela\Framework\ClassResolver\ClassNameCache;
9
use Gacela\Framework\ClassResolver\DocBlockService\CustomServicesCache;
10
use Gacela\Framework\Gacela;
11
use PHPUnit\Framework\TestCase;
12
13
final class NoFileCacheFeatureTest extends TestCase
14
{
15
    public function setUp(): void
16
    {
17
        Gacela::bootstrap(__DIR__, static function (GacelaConfig $config): void {
18
            $config->setCacheEnabled(false);
19
            $config->setCacheDirectory('custom/no-caching-dir');
20
        });
21
    }
22
23
    public function test_custom_no_caching_dir(): void
24
    {
25
        $facade = new Module\Facade();
26
        self::assertSame('name', $facade->getName());
27
28
        self::assertFileDoesNotExist(__DIR__ . '/custom/no-caching-dir/' . ClassNameCache::CACHE_FILENAME);
29
        self::assertFileDoesNotExist(__DIR__ . '/custom/no-caching-dir/' . CustomServicesCache::CACHE_FILENAME);
30
    }
31
}
32