TestBase::getAimeosPublic()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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-2025
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 = \TestHelper::context();
22
		$aimeos = \TestHelper::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\ContextIface::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
48
class TestBase
49
	extends \Aimeos\Controller\Jobs\Common\Decorator\Base
50
{
51
	public function getContextPublic()
52
	{
53
		return $this->context();
54
	}
55
56
	public function getAimeosPublic()
57
	{
58
		return $this->getAimeos();
59
	}
60
}
61