1 | <?php |
||
2 | |||
3 | namespace Pronamic\WordPress\Pay\Gateways\IDealBasic; |
||
4 | |||
5 | use DateTime; |
||
6 | use Pronamic\WordPress\Pay\Gateways\IDeal\Statuses; |
||
7 | |||
8 | class TestNotificationParser extends \WP_UnitTestCase { |
||
0 ignored issues
–
show
|
|||
9 | public function test_init() { |
||
10 | $filename = dirname( __FILE__ ) . '/Mock/notification.xml'; |
||
11 | |||
12 | $simplexml = simplexml_load_file( $filename ); |
||
13 | |||
14 | $this->assertInstanceOf( 'SimpleXMLElement', $simplexml ); |
||
15 | |||
16 | return $simplexml; |
||
17 | } |
||
18 | |||
19 | /** |
||
20 | * Test parser |
||
21 | * |
||
22 | * @depends test_init |
||
23 | */ |
||
24 | public function test_parser( $simplexml ) { |
||
25 | $notification = XML\NotificationParser::parse( $simplexml ); |
||
26 | |||
27 | $this->assertInstanceOf( 'Pronamic\WordPress\Pay\Gateways\IDealBasic\Notification', $notification ); |
||
28 | |||
29 | return $notification; |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Test values |
||
34 | * |
||
35 | * @depends test_parser |
||
36 | */ |
||
37 | public function test_values( $notification ) { |
||
38 | $expected = new Notification(); |
||
39 | $expected->set_date( new DateTime( '20131022120742' ) ); |
||
40 | $expected->set_transaction_id( '0020000048638175' ); |
||
41 | $expected->set_purchase_id( '1382436458' ); |
||
42 | $expected->set_status( Statuses::SUCCESS ); |
||
43 | |||
44 | $this->assertEquals( $expected, $notification ); |
||
45 | } |
||
46 | } |
||
47 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths