phpunit: Add @covers to ObjectFactoryTest
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 17 Aug 2016 16:11:51 +0000 (09:11 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Wed, 17 Aug 2016 16:11:51 +0000 (09:11 -0700)
* 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

tests/phpunit/includes/libs/ObjectFactoryTest.php

index a4871a6..043be4e 100644 (file)
@@ -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() {