Passed
Push — master ( d2c98a...701a91 )
by wiese
37s
created

SofortPaymentTest::testAccessors()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace WMDE\Fundraising\Store\Tests\Unit\DonationPayments;
6
7
use DateTime;
8
use PHPUnit\Framework\TestCase;
9
use WMDE\Fundraising\Entities\DonationPayments\SofortPayment;
10
11
/**
12
 * @covers \WMDE\Fundraising\Entities\DonationPayments\SofortPayment
13
 */
14
class SofortPaymentTest extends TestCase {
15
16
	public function testInitialProperties(): void {
17
		$payment = new SofortPayment();
18
		$this->assertNull( $payment->getConfirmedAt() );
19
	}
20
21
	public function testAccessors(): void {
22
		$payment = new SofortPayment();
23
		$payment->setId( 5 );
24
		$payment->setConfirmedAt( new DateTime( '2008-11-03T15:30:00Z' ) );
25
26
		$this->assertSame( 5, $payment->getId() );
27
		$this->assertEquals( new DateTime( '2008-11-03T15:30:00Z' ), $payment->getConfirmedAt() );
28
	}
29
}
30