CurrencyInfoKeysTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testProvidesKeysInCurrencyInfoArray() 0 5 1
A testProvidesStaticGetterMethod() 0 4 1
A currencyInfoKeyDataProvider() 0 10 1
1
<?php
2
3
namespace VinaiKopp\CurrencyInfo\Build;
4
5
use VinaiKopp\CurrencyInfo\StaticAccess\CurrencyInfo;
6
7
/**
8
 * @covers \VinaiKopp\CurrencyInfo\Build\CurrencyInfoKeys
9
 */
10
class CurrencyInfoKeysTest extends \PHPUnit_Framework_TestCase
11
{
12
    /**
13
     * @param string $expectedKey
14
     * @dataProvider currencyInfoKeyDataProvider
15
     */
16
    public function testProvidesKeysInCurrencyInfoArray($expectedKey)
17
    {
18
        $currencyInfoKeys = new CurrencyInfoKeys();
19
        $this->assertContains($expectedKey, $currencyInfoKeys->get());
20
    }
21
22
    /**
23
     * @param string $expectedKey
24
     * @dataProvider currencyInfoKeyDataProvider
25
     */
26
    public function testProvidesStaticGetterMethod($expectedKey)
27
    {
28
        $this->assertContains($expectedKey, CurrencyInfoKeys::getStatic());
29
    }
30
31
    /**
32
     * @return array[]
33
     */
34
    public function currencyInfoKeyDataProvider()
35
    {
36
        return [
37
            [CurrencyInfo::SYMBOL],
38
            [CurrencyInfo::SYMBOL_NATIVE],
39
            [CurrencyInfo::FRACTION_DIGITS],
40
            [CurrencyInfo::ROUNDING],
41
            [CurrencyInfo::CODE],
42
        ];
43
    }
44
}
45