Failed Conditions
Push — master ( f5ff3b...44b23a )
by Remco
147:23 queued 138:46
created

ErrorTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testToStringError() 0 10 1
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3;
4
5
use PHPUnit_Framework_TestCase;
6
7
/**
8
 * Title: iDEAL Advanced v3 error test
9
 * Description:
10
 * Copyright: 2005-2019 Pronamic
11
 * Company: Pronamic
12
 *
13
 * @author Remco Tolsma
14
 * @version 1.0.0
15
 */
16
class ErrorTest extends PHPUnit_Framework_TestCase {
17
	public function testToStringError() {
18
		$error = new Error();
19
		$error->set_code( '1' );
20
		$error->set_message( 'Error' );
21
22
		$string = (string) $error;
23
24
		$expected = '1 Error';
25
26
		$this->assertEquals( $expected, $string );
27
	}
28
}
29