Passed
Push — master ( fa79ba...4fcbee )
by Aimeos
08:39 queued 05:58
created

Typo3Test   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 34
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 5 1
A testGetClientAddress() 0 3 1
A testTransform() 0 3 1
A testGetTarget() 0 3 1
A tearDown() 0 3 1
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2015-2022
6
 */
7
8
9
namespace Aimeos\Base\View\Helper\Request;
10
11
12
class Typo3Test extends \PHPUnit\Framework\TestCase
13
{
14
	private $object;
15
16
17
	protected function setUp() : void
18
	{
19
		$view = new \Aimeos\Base\View\Standard();
20
		$server = array( 'REMOTE_ADDR' => '127.0.0.1' );
21
		$this->object = new \Aimeos\Base\View\Helper\Request\Typo3( $view, 123, [], [], [], [], $server );
22
	}
23
24
25
	protected function tearDown() : void
26
	{
27
		unset( $this->object );
28
	}
29
30
31
	public function testTransform()
32
	{
33
		$this->assertInstanceOf( '\Aimeos\Base\View\Helper\Request\Typo3', $this->object->transform() );
34
	}
35
36
37
	public function testGetClientAddress()
38
	{
39
		$this->assertEquals( '127.0.0.1', $this->object->getClientAddress() );
40
	}
41
42
43
	public function testGetTarget()
44
	{
45
		$this->assertEquals( 123, $this->object->getTarget() );
46
	}
47
}
48