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

testDataEncodingAndDecodingRoundtrips()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 14
rs 9.4285
cc 1
eloc 9
nc 1
nop 0
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