Test Failed
Push — master ( 8d2aba...5d5a5b )
by Remco
19:07 queued 11:16
created

NotificationTest::test_notification()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 9
nc 1
nop 0
dl 0
loc 11
rs 9.9666
c 0
b 0
f 0
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\IDealBasic;
4
5
use DateTime;
6
use Pronamic\WordPress\Pay\Core\Statuses;
7
8
class NotificationTest extends \WP_UnitTestCase {
9
	public function test_notification() {
10
		$notification = new Notification();
11
		$notification->set_date( new DateTime() );
12
		$notification->set_transaction_id( '1234567890' );
13
		$notification->set_purchase_id( '123456' );
14
		$notification->set_status( Statuses::SUCCESS );
15
16
		$this->assertInstanceOf( 'DateTime', $notification->get_date() );
17
		$this->assertEquals( '1234567890', $notification->get_transaction_id() );
18
		$this->assertEquals( '123456', $notification->get_purchase_id() );
19
		$this->assertEquals( Statuses::SUCCESS, $notification->get_status() );
20
	}
21
}
22