Completed
Push — master ( b59c0c...c68fa7 )
by Josef
08:24
created

TransactionSettlementExtensionTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 18
rs 10
c 1
b 0
f 1
wmc 1
lcom 0
cbo 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCreateResponse() 0 13 1
1
<?php declare(strict_types = 1);
2
3
namespace SlevomatCsobGateway\Call\Extension;
4
5
class TransactionSettlementExtensionTest extends \PHPUnit_Framework_TestCase
6
{
7
8
	public function testCreateResponse()
9
	{
10
		$transactionSettlementExtension = new TransactionSettlementExtension();
11
		$transactionSettlementResponse = $transactionSettlementExtension->createResponse([
12
			'createdDate' => '2016-04-12T12:06:20.848Z',
13
			'authDate' => '160412100635',
14
			'settlementDate' => '20160412',
15
		]);
16
17
		$this->assertSame('2016-04-12 12:06:20 848000', $transactionSettlementResponse->getCreatedDate()->format('Y-m-d H:i:s u'));
18
		$this->assertSame('2016-04-12 10:06:35', $transactionSettlementResponse->getAuthDate()->format('Y-m-d H:i:s'));
19
		$this->assertSame('2016-04-12', $transactionSettlementResponse->getSettlementDate()->format('Y-m-d'));
20
	}
21
22
}
23