File tree Expand file tree Collapse file tree 1 file changed +69
-0
lines changed
Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Original file line number Diff line number Diff line change @@ -289,6 +289,75 @@ public function testGetLinesToBeIgnored2()
289289 );
290290 }
291291
292+ /**
293+ * @covers PHP_CodeCoverage_Util::getPackageInformation
294+ */
295+ public function testGetPackageInformation ()
296+ {
297+ $ this ->assertEquals (
298+ array (
299+ 'category ' => 'Foo ' ,
300+ 'fullPackage ' => 'Bar.Baz ' ,
301+ 'namespace ' => '' ,
302+ 'package ' => 'Bar ' ,
303+ 'subpackage ' => 'Baz '
304+ ),
305+ PHP_CodeCoverage_Util::getPackageInformation (
306+ 'Foo ' ,
307+ '/**
308+ * @category Foo
309+ * @package Bar
310+ * @subpackage Baz
311+ */ '
312+ )
313+ );
314+ }
315+
316+ /**
317+ * @covers PHP_CodeCoverage_Util::getPackageInformation
318+ * @covers PHP_CodeCoverage_Util::arrayToName
319+ */
320+ public function testGetPackageInformation2 ()
321+ {
322+ $ this ->assertEquals (
323+ array (
324+ 'category ' => 'Foo ' ,
325+ 'fullPackage ' => 'Bar.Baz ' ,
326+ 'namespace ' => 'Foo ' ,
327+ 'package ' => 'Bar ' ,
328+ 'subpackage ' => 'Baz '
329+ ),
330+ PHP_CodeCoverage_Util::getPackageInformation (
331+ 'Foo \\Bar ' ,
332+ '/**
333+ * @category Foo
334+ * @package Bar
335+ * @subpackage Baz
336+ */ '
337+ )
338+ );
339+ }
340+
341+ /**
342+ * @covers PHP_CodeCoverage_Util::getPackageInformation
343+ */
344+ public function testGetPackageInformation3 ()
345+ {
346+ $ this ->assertEquals (
347+ array (
348+ 'category ' => '' ,
349+ 'fullPackage ' => '' ,
350+ 'namespace ' => '' ,
351+ 'package ' => '' ,
352+ 'subpackage ' => ''
353+ ),
354+ PHP_CodeCoverage_Util::getPackageInformation (
355+ 'Foo ' ,
356+ ''
357+ )
358+ );
359+ }
360+
292361 public function getLinesToBeCoveredProvider ()
293362 {
294363 return array (
You can’t perform that action at this time.
0 commit comments