From: Timo Tijhof Date: Wed, 17 Aug 2016 16:11:51 +0000 (-0700) Subject: phpunit: Add @covers to ObjectFactoryTest X-Git-Tag: 1.31.0-rc.0~6015^2 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=6bb00b92bbbf15359a770f26cd3dab5fb0d16ccd;p=lhc%2Fweb%2Fwiklou.git phpunit: Add @covers to ObjectFactoryTest * expandClosures() wasn't covered at all. Make the test dedicated to this feature cover that method. * constructClassInstance() coverage was almost complete except for the exception case. This was covered in a separate test, but it was missing its @covers tag. Change-Id: I73252849a92440fd7ae2c44f9ca58f7bf9c1f92c --- diff --git a/tests/phpunit/includes/libs/ObjectFactoryTest.php b/tests/phpunit/includes/libs/ObjectFactoryTest.php index a4871a64c4..043be4e17c 100644 --- a/tests/phpunit/includes/libs/ObjectFactoryTest.php +++ b/tests/phpunit/includes/libs/ObjectFactoryTest.php @@ -44,6 +44,7 @@ class ObjectFactoryTest extends PHPUnit_Framework_TestCase { /** * @covers ObjectFactory::getObjectFromSpec + * @covers ObjectFactory::expandClosures */ public function testClosureExpansionEnabled() { $obj = ObjectFactory::getObjectFromSpec( [ @@ -110,6 +111,7 @@ class ObjectFactoryTest extends PHPUnit_Framework_TestCase { } /** + * @covers ObjectFactory::constructClassInstance * @expectedException InvalidArgumentException */ public function testNamedArgs() {