Passed
Push — master ( 94cd2d...fa1d41 )
by Aimeos
02:24
created

StandardTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 13
c 2
b 0
f 0
dl 0
loc 27
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetFallback() 0 11 1
A testGet() 0 11 1
1
<?php
2
3
namespace Aimeos\Base\Filesystem\Manager;
4
5
6
class StandardTest extends \PHPUnit\Framework\TestCase
7
{
8
	public function testGet()
9
	{
10
		$config = \TestHelper::getConfig()->get( 'resource' );
11
		$config['fs-media'] = [
12
			'adapter' => 'Standard',
13
			'basedir' => __DIR__
14
		];
15
16
		$object = new \Aimeos\Base\Filesystem\Manager\Standard( $config );
17
18
		$this->assertInstanceof( 'Aimeos\Base\Filesystem\Iface', $object->get( 'fs-media' ) );
19
	}
20
21
22
	public function testGetFallback()
23
	{
24
		$config = \TestHelper::getConfig()->get( 'resource' );
25
		$config['fs'] = [
26
			'adapter' => 'Standard',
27
			'basedir' => __DIR__
28
		];
29
30
		$object = new \Aimeos\Base\Filesystem\Manager\Standard( $config );
31
32
		$this->assertInstanceof( 'Aimeos\Base\Filesystem\Iface', $object->get( 'fs-media' ) );
33
	}
34
}
35