Test Failed
Push — develop ( 6098b1...78195a )
by Reüel
02:46
created

tests/Connect/StatusesTest.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\MultiSafepay\Connect;
4
5
use WP_UnitTestCase;
0 ignored issues
show
The type WP_UnitTestCase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Pronamic\WordPress\Pay\Core\Statuses as Core_Statuses;
7
8
/**
9
 * Title: MultiSafepay statuses test
10
 * Description:
11
 * Copyright: 2005-2019 Pronamic
12
 * Company: Pronamic
13
 *
14
 * @author  Remco Tolsma
15
 * @version 2.0.2
16
 * @since   1.2.0
17
 */
18
class StatusesTest extends WP_UnitTestCase {
19
	/**
20
	 * Test transform
21
	 *
22
	 * @dataProvider status_matrix_provider
23
	 */
24
	public function test_transform( $status, $expected ) {
25
		$status = Statuses::transform( $status );
26
27
		$this->assertEquals( $expected, $status );
28
	}
29
30
	public function status_matrix_provider() {
31
		return array(
32
			array( Statuses::COMPLETED, Core_Statuses::SUCCESS ),
33
			array( Statuses::INITIALIZED, Core_Statuses::OPEN ),
34
			array( Statuses::UNCLEARED, Core_Statuses::OPEN ),
35
			array( Statuses::VOID, Core_Statuses::CANCELLED ),
36
			array( Statuses::DECLINED, Core_Statuses::FAILURE ),
37
			array( Statuses::REFUNDED, Core_Statuses::CANCELLED ),
38
			array( Statuses::EXPIRED, Core_Statuses::EXPIRED ),
39
			array( 'not existing response code', null ),
40
		);
41
	}
42
}
43