ItemTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_item() 0 8 1
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\IDealBasic;
4
5
use Pronamic\WordPress\Money\Money;
6
7
class ItemTest extends \WP_UnitTestCase {
8
	/**
9
	 * Test item.
10
	 */
11
	public function test_item() {
12
		$item = new Item( '1', 'Description', 1, new Money( 123.50 ) );
13
14
		$this->assertEquals( '1', $item->get_number() );
15
		$this->assertEquals( 'Description', $item->get_description() );
16
		$this->assertEquals( 1, $item->get_quantity() );
17
		$this->assertEquals( new Money( 123.50 ), $item->get_price() );
18
		$this->assertEquals( 123.50, $item->get_amount() );
19
	}
20
}
21