ErrorTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 14
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testToStringError() 0 10 1
1
<?php
2
/**
3
 * Error test.
4
 *
5
 * @author    Pronamic <[email protected]>
6
 * @copyright 2005-2021 Pronamic
7
 * @license   GPL-3.0-or-later
8
 * @package   Pronamic\WordPress\Pay
9
 */
10
11
namespace Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3;
12
13
use PHPUnit_Framework_TestCase;
14
15
/**
16
 * Title: iDEAL Advanced v3 error test
17
 * Description:
18
 * Copyright: 2005-2021 Pronamic
19
 * Company: Pronamic
20
 *
21
 * @author Remco Tolsma
22
 * @version 1.0.0
23
 */
24
class ErrorTest extends PHPUnit_Framework_TestCase {
25
	/**
26
	 * Test error to string.
27
	 */
28
	public function testToStringError() {
29
		$error = new Error();
30
		$error->set_code( '1' );
31
		$error->set_message( 'Error' );
32
33
		$string = (string) $error;
34
35
		$expected = '1 Error';
36
37
		$this->assertEquals( $expected, $string );
38
	}
39
}
40