1 | <?php |
||
12 | use MVar\Apache2LogParser\KeyBag; |
||
13 | |||
14 | class KeyBagTest extends \PHPUnit_Framework_TestCase |
||
15 | { |
||
16 | /** |
||
17 | * Test for add() and get() methods. |
||
18 | * |
||
19 | * @param string $namespace |
||
20 | * @param string $key |
||
21 | * |
||
22 | * @dataProvider getTestAddAndGetData() |
||
23 | */ |
||
24 | public function testAddAndGet($namespace, $key) |
||
31 | |||
32 | /** |
||
33 | * Test for get() when nothing is set. |
||
34 | */ |
||
35 | public function testGetNull() |
||
41 | |||
42 | /** |
||
43 | * Test for getNamespaces(). |
||
44 | */ |
||
45 | public function testGetNamespaces() |
||
63 | |||
64 | /** |
||
65 | * Test for registerNamespace(). |
||
66 | */ |
||
67 | public function testRegisterNamespace() |
||
76 | |||
77 | /** |
||
78 | * Data provider for testAddAndGet(). |
||
79 | * |
||
80 | * @return array[] |
||
81 | */ |
||
82 | public function getTestAddAndGetData() |
||
83 | { |
||
84 | return [ |
||
85 | ['namespace_1', 'key_11'], |
||
86 | ['namespace_2', 'key_21'], |
||
87 | ]; |
||
88 | } |
||
90 |