MonolingualMonthNameProviderTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 13
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetLocalizedMonthNames() 0 4 1
A testGetMonthNumbers() 0 4 1
1
<?php
2
3
namespace ValueParsers\Test;
4
5
use PHPUnit_Framework_TestCase;
6
use ValueParsers\MonolingualMonthNameProvider;
7
8
/**
9
 * @covers ValueParsers\MonolingualMonthNameProvider
10
 *
11
 * @group DataValue
12
 * @group DataValueExtensions
13
 * @group ValueParsers
14
 *
15
 * @license GPL-2.0+
16
 * @author Thiemo Kreuz
17
 */
18
class MonolingualMonthNameProviderTest extends PHPUnit_Framework_TestCase {
19
20
	public function testGetLocalizedMonthNames() {
21
		$instance = new MonolingualMonthNameProvider( array( 1 => 'January' ) );
22
		$this->assertSame( array( 1 => 'January' ), $instance->getLocalizedMonthNames( 'xx' ) );
23
	}
24
25
	public function testGetMonthNumbers() {
26
		$instance = new MonolingualMonthNameProvider( array( 1 => 'January' ) );
27
		$this->assertSame( array( 'January' => 1 ), $instance->getMonthNumbers( 'xx' ) );
28
	}
29
30
}
31