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

Typo3Test::testGetCache()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
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