Completed
Push — master ( 7c92aa...c1e3b2 )
by
unknown
03:44 queued 39s
created

DonationTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testDataEncodingAndDecodingRoundtrips() 0 14 1
1
<?php
2
3
namespace WMDE\Fundraising\Store\Tests;
4
5
use WMDE\Fundraising\Entities\Donation;
6
7
/**
8
 * @covers WMDE\Fundraising\Entities\Donation
9
 *
10
 * @licence GNU GPL v2+
11
 * @author Jeroen De Dauw < [email protected] >
12
 */
13
class DonationTest extends \PHPUnit_Framework_TestCase {
14
15
	public function testDataEncodingAndDecodingRoundtrips() {
16
		$donation = new Donation();
17
18
		$someData = [
19
			'nyan' => 'cat',
20
			'foo' => null,
21
			'bar' => 9000.01,
22
			'baz' => [ true ]
23
		];
24
25
		$donation->encodeAndSetData( $someData );
26
27
		$this->assertSame( $someData, $donation->getDecodedData() );
28
	}
29
30
}
31