Test Failed
Push — develop ( 6d438f...599fdd )
by Reüel
03:09
created

TestPaymentRequestSeal::test_seal()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 18
rs 9.8333
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\OmniKassa;
4
5
use WP_UnitTestCase;
0 ignored issues
show
Bug introduced by
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
7
class TestPaymentRequestSeal extends WP_UnitTestCase {
8
	function test_seal() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
9
		$omnikassa = new Client();
10
11
		$omnikassa->set_amount( 55 );
12
		$omnikassa->set_currency_numeric_code( 978 );
13
		$omnikassa->set_merchant_id( '011223744550001' );
14
		$omnikassa->set_normal_return_url( 'http://www.normalreturnurl.nl' );
15
		$omnikassa->set_automatic_response_url( 'http://www.automaticresponseurl.nl' );
16
		$omnikassa->set_transaction_reference( '534654' );
17
		$omnikassa->set_order_id( '201208345' );
18
		$omnikassa->set_key_version( 1 );
19
		$omnikassa->set_secret_key( '002020000000001_KEY1' );
20
21
		$expected = '421cf499fae491858b8ba0b89d94b05dcc3895ab5c005f6c524f0dfe08b9ed68';
22
23
		$actual = $omnikassa->get_seal();
24
25
		$this->assertEquals( $expected, $actual );
26
	}
27
}
28