@@ -32,14 +32,14 @@ public function testProcessSimpleCase()
32
32
33
33
$ this ->assertArrayHasKey ('handlers ' , $ config );
34
34
$ this ->assertArrayHasKey ('foobar ' , $ config ['handlers ' ]);
35
- $ this ->assertEquals ('stream ' , $ config ['handlers ' ]['foobar ' ]['type ' ]);
35
+ $ this ->assertEquals ('stream ' , $ config ['handlers ' ]['foobar ' ]['type ' ]);
36
36
$ this ->assertEquals ('/foo/bar ' , $ config ['handlers ' ]['foobar ' ]['path ' ]);
37
37
}
38
38
39
39
public function provideProcessStringChannels ()
40
40
{
41
41
return array (
42
- array ('foo ' , 'foo ' , true ),
42
+ array ('foo ' , 'foo ' , true ),
43
43
array ('!foo ' , 'foo ' , false )
44
44
);
45
45
}
@@ -53,8 +53,8 @@ public function testProcessStringChannels($string, $expectedString, $isInclusive
53
53
array (
54
54
'handlers ' => array (
55
55
'foobar ' => array (
56
- 'type ' => 'stream ' ,
57
- 'path ' => '/foo/bar ' ,
56
+ 'type ' => 'stream ' ,
57
+ 'path ' => '/foo/bar ' ,
58
58
'channels ' => $ string
59
59
)
60
60
)
@@ -68,6 +68,43 @@ public function testProcessStringChannels($string, $expectedString, $isInclusive
68
68
$ this ->assertEquals ($ expectedString , $ config ['handlers ' ]['foobar ' ]['channels ' ]['elements ' ][0 ]);
69
69
}
70
70
71
+ public function provideGelfPublisher ()
72
+ {
73
+ return array (
74
+ array (
75
+ 'gelf.publisher '
76
+ ),
77
+ array (
78
+ array (
79
+ 'id ' => 'gelf.publisher '
80
+ )
81
+ )
82
+ );
83
+ }
84
+
85
+ /**
86
+ * @dataProvider provideGelfPublisher
87
+ */
88
+ public function testGelfPublisherService ($ publisher )
89
+ {
90
+ $ configs = array (
91
+ array (
92
+ 'handlers ' => array (
93
+ 'gelf ' => array (
94
+ 'type ' => 'gelf ' ,
95
+ 'publisher ' => $ publisher ,
96
+ ),
97
+ )
98
+ )
99
+ );
100
+
101
+ $ config = $ this ->process ($ configs );
102
+
103
+ $ this ->assertArrayHasKey ('id ' , $ config ['handlers ' ]['gelf ' ]['publisher ' ]);
104
+ $ this ->assertArrayNotHasKey ('hostname ' , $ config ['handlers ' ]['gelf ' ]['publisher ' ]);
105
+ $ this ->assertEquals ('gelf.publisher ' , $ config ['handlers ' ]['gelf ' ]['publisher ' ]['id ' ]);
106
+ }
107
+
71
108
public function testArrays ()
72
109
{
73
110
$ configs = array (
0 commit comments