Passed
Push — master ( 3733ad...496203 )
by Aimeos
18:14 queued 04:23
created

Typo3Test   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 11
c 2
b 0
f 0
dl 0
loc 32
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A tearDown() 0 3 1
A testGetCache() 0 4 1
A testSetCache() 0 3 1
A setUp() 0 6 1
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2015-2023
6
 */
7
8
9
namespace Aimeos\MAdmin\Cache\Manager;
10
11
12
class Typo3Test extends \PHPUnit\Framework\TestCase
13
{
14
	private $context;
0 ignored issues
show
introduced by
The private property $context is not used, and could be removed.
Loading history...
15
	private $object;
16
	private $stub;
17
18
19
	protected function setUp() : void
20
	{
21
		$context = \TestHelper::context();
22
		$this->stub = $this->getMockBuilder( \TYPO3\CMS\Core\Cache\Frontend\FrontendInterface::class )->getMock();
23
24
		$this->object = new \Aimeos\MAdmin\Cache\Manager\Typo3( $context );
25
	}
26
27
28
	protected function tearDown() : void
29
	{
30
		unset( $this->object, $this->stub );
31
	}
32
33
34
	public function testSetCache()
35
	{
36
		$this->assertInstanceOf( \Aimeos\MAdmin\Cache\Manager\Iface::class, $this->object->setCache( $this->stub ) );
37
	}
38
39
40
	public function testGetCache()
41
	{
42
		$this->object->setCache( $this->stub );
43
		$this->assertInstanceOf( \Aimeos\Base\Cache\Iface::class, $this->object->getCache() );
44
	}
45
}
46