Completed
Push — monthNameProvider ( 64d0f0 )
by no
02:31
created

MonolingualMonthNameProviderTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 16
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
 * @licence GNU GPL v2+
16
 * @author Thiemo Mättig
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
	/**
26
	 * @dataProvider languageCodeProvider
27
	 */
28
	public function testGetMonthNumbers() {
29
		$instance = new MonolingualMonthNameProvider( array( 1 => 'January' ) );
30
		$this->assertSame( array( 'January' => 1 ), $instance->getMonthNumbers( 'xx' ) );
31
	}
32
33
}
34