FileCacheAdapterFactoryTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCreateAdapterReturnsAdapter() 0 8 1
1
<?php
2
/**
3
 * File: FileCacheAdapterFactoryTest.php
4
 *
5
 * @author      Maciej Sławik <[email protected]>
6
 * Github:      https://github.com/maciejslawik
7
 */
8
9
namespace MSlwk\Otomoto\Middleware\Test\Unit\Cache\Factory\File;
10
11
use MSlwk\Otomoto\Middleware\Cache\Adapter\CacheAdapterInterface;
12
use MSlwk\Otomoto\Middleware\Cache\Factory\File\FileCacheAdapterFactory;
13
use MSlwk\Otomoto\Middleware\Cache\Factory\File\OptionsProvider\FileDriverOptionsProviderInterface;
14
use PHPUnit\Framework\TestCase;
15
16
/**
17
 * Class FileCacheAdapterFactoryTest
18
 * @package MSlwk\Otomoto\Middleware\Test\Unit\Cache\Factory\File
19
 */
20
class FileCacheAdapterFactoryTest extends TestCase
21
{
22
    /**
23
     * @test
24
     */
25
    public function testCreateAdapterReturnsAdapter()
26
    {
27
        /** @var FileDriverOptionsProviderInterface $optionsProvider */
28
        $optionsProvider = $this->getMockBuilder(FileDriverOptionsProviderInterface::class)
29
            ->setMethods(['getOptions'])
30
            ->getMock();
31
        $factory = new FileCacheAdapterFactory($optionsProvider);
32
        $this->assertInstanceOf(CacheAdapterInterface::class, $factory->createAdapter());
33
    }
34
}
35