ExceptionTest   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 6
dl 0
loc 31
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetCode() 0 3 1
A tearDown() 0 2 1
A testGetMessage() 0 3 1
A setUp() 0 3 1
A testGetErrorList() 0 3 1
1
<?php
2
3
namespace Aimeos\Controller\Frontend;
4
5
6
/**
7
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
8
 * @copyright Metaways Infosystems GmbH, 2013
9
 * @copyright Aimeos (aimeos.org), 2015-2025
10
 */
11
class ExceptionTest extends \PHPUnit\Framework\TestCase
12
{
13
	private $object;
14
15
16
	protected function setUp() : void
17
	{
18
		$this->object = new \Aimeos\Controller\Frontend\Exception( 'msg', 1, null, array( 'key' => 'value' ) );
19
	}
20
21
22
	protected function tearDown() : void
23
	{
24
	}
25
26
27
	public function testGetMessage()
28
	{
29
		$this->assertEquals( 'msg', $this->object->getMessage() );
30
	}
31
32
33
	public function testGetCode()
34
	{
35
		$this->assertEquals( 1, $this->object->getCode() );
36
	}
37
38
39
	public function testGetErrorList()
40
	{
41
		$this->assertEquals( array( 'key' => 'value' ), $this->object->getErrorList() );
42
	}
43
}
44