NotificationTest::test_notification()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 9
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 11
rs 9.9666
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\IDealBasic;
4
5
use DateTime;
6
use Pronamic\WordPress\Pay\Payments\PaymentStatus;
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( PaymentStatus::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( PaymentStatus::SUCCESS, $notification->get_status() );
20
	}
21
}
22