@@ -32,14 +32,14 @@ public function testProcessSimpleCase()
3232
3333 $ this ->assertArrayHasKey ('handlers ' , $ config );
3434 $ this ->assertArrayHasKey ('foobar ' , $ config ['handlers ' ]);
35- $ this ->assertEquals ('stream ' , $ config ['handlers ' ]['foobar ' ]['type ' ]);
35+ $ this ->assertEquals ('stream ' , $ config ['handlers ' ]['foobar ' ]['type ' ]);
3636 $ this ->assertEquals ('/foo/bar ' , $ config ['handlers ' ]['foobar ' ]['path ' ]);
3737 }
3838
3939 public function provideProcessStringChannels ()
4040 {
4141 return array (
42- array ('foo ' , 'foo ' , true ),
42+ array ('foo ' , 'foo ' , true ),
4343 array ('!foo ' , 'foo ' , false )
4444 );
4545 }
@@ -53,8 +53,8 @@ public function testProcessStringChannels($string, $expectedString, $isInclusive
5353 array (
5454 'handlers ' => array (
5555 'foobar ' => array (
56- 'type ' => 'stream ' ,
57- 'path ' => '/foo/bar ' ,
56+ 'type ' => 'stream ' ,
57+ 'path ' => '/foo/bar ' ,
5858 'channels ' => $ string
5959 )
6060 )
@@ -68,6 +68,43 @@ public function testProcessStringChannels($string, $expectedString, $isInclusive
6868 $ this ->assertEquals ($ expectedString , $ config ['handlers ' ]['foobar ' ]['channels ' ]['elements ' ][0 ]);
6969 }
7070
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+
71108 public function testArrays ()
72109 {
73110 $ configs = array (
0 commit comments