ErrorTest::testToStringError()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 10
rs 10
c 0
b 0
f 0
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