Completed
Push — master ( 4fbb13...0db14d )
by Aimeos
11:06
created

FlowTest::setUp()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 7
nc 2
nop 0
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2017
6
 */
7
8
9
namespace Aimeos\MAdmin\Cache\Proxy;
10
11
12
class FlowTest extends \PHPUnit_Framework_TestCase
13
{
14
	private $object;
15
	private $mock;
16
17
18
	protected function setUp()
19
	{
20
		if( class_exists( 'Neos\Cache\Frontend\StringFrontend' ) === false ) {
21
			$this->markTestSkipped( 'Class \\Neos\\Cache\\Frontend\\StringFrontend not found' );
22
		}
23
24
		$this->mock = $this->getMockBuilder( 'Neos\Cache\Frontend\StringFrontend' )
25
			->disableOriginalConstructor()
26
			->getMock();
27
28
		$this->object = new \Aimeos\MAdmin\Cache\Proxy\Flow( \TestHelper::getContext(), $this->mock );
29
	}
30
31
32
	protected function tearDown()
33
	{
34
		unset( $this->mock, $this->object );
35
	}
36
37
38
	public function testGetObject()
39
	{
40
		$class = new \ReflectionClass( '\Aimeos\MAdmin\Cache\Proxy\Flow' );
41
		$method = $class->getMethod( 'getObject' );
42
		$method->setAccessible( true );
43
44
		$result = $method->invokeArgs( $this->object, [] );
45
		$this->assertInstanceOf( '\Aimeos\MW\Cache\Iface', $result );
46
	}
47
}
48