Passed
Push — master ( d7c3ec...93a960 )
by Aimeos
03:37
created

BaseTest::testCall()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
5
 * @copyright Metaways Infosystems GmbH, 2013
6
 * @copyright Aimeos (aimeos.org), 2015-2022
7
 */
8
9
10
namespace Aimeos\Controller\Jobs\Common\Decorator;
11
12
13
class BaseTest extends \PHPUnit\Framework\TestCase
14
{
15
	private $stub;
16
	private $object;
17
18
19
	protected function setUp() : void
20
	{
21
		$context = \TestHelperJobs::context();
22
		$aimeos = \TestHelperJobs::getAimeos();
23
24
		$this->stub = $this->getMockBuilder( \Aimeos\Controller\Jobs\Iface::class )->getMock();
25
		$this->object = new TestBase( $this->stub, $context, $aimeos );
26
	}
27
28
29
	protected function tearDown() : void
30
	{
31
		unset( $this->object );
32
	}
33
34
35
	public function testGetContext()
36
	{
37
		$this->assertInstanceOf( \Aimeos\MShop\Context\Item\Iface::class, $this->object->getContextPublic() );
38
	}
39
40
41
	public function testGetAimeos()
42
	{
43
		$this->assertInstanceOf( \Aimeos\Bootstrap::class, $this->object->getAimeosPublic() );
44
	}
45
46
47
	public function testCall()
48
	{
49
		$this->markTestInComplete( 'PHP warning is triggered instead of exception' );
50
	}
51
52
}
53
54
55
class TestBase
56
	extends \Aimeos\Controller\Jobs\Common\Decorator\Base
57
{
58
	public function getContextPublic()
59
	{
60
		return $this->context();
61
	}
62
63
	public function getAimeosPublic()
64
	{
65
		return $this->getAimeos();
66
	}
67
}
68