X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Flibs%2FObjectFactoryTest.php;h=18d7d056427d0fb9f07814511a8ad800d4856ad2;hp=35a7b6028d6f9fc79c97623fe097f89804de037a;hb=d5050065d259be07d64b3262e4e10300fb1f40d0;hpb=12601ff7d2796752404bfb331fccc41083d31f9f diff --git a/tests/phpunit/includes/libs/ObjectFactoryTest.php b/tests/phpunit/includes/libs/ObjectFactoryTest.php index 35a7b6028d..18d7d05642 100644 --- a/tests/phpunit/includes/libs/ObjectFactoryTest.php +++ b/tests/phpunit/includes/libs/ObjectFactoryTest.php @@ -20,12 +20,14 @@ class ObjectFactoryTest extends PHPUnit_Framework_TestCase { + use MediaWikiCoversValidator; + /** * @covers ObjectFactory::getObjectFromSpec */ public function testClosureExpansionDisabled() { $obj = ObjectFactory::getObjectFromSpec( [ - 'class' => 'ObjectFactoryTestFixture', + 'class' => ObjectFactoryTestFixture::class, 'args' => [ function () { return 'wrapped'; @@ -52,7 +54,7 @@ class ObjectFactoryTest extends PHPUnit_Framework_TestCase { */ public function testClosureExpansionEnabled() { $obj = ObjectFactory::getObjectFromSpec( [ - 'class' => 'ObjectFactoryTestFixture', + 'class' => ObjectFactoryTestFixture::class, 'args' => [ function () { return 'wrapped'; @@ -73,7 +75,7 @@ class ObjectFactoryTest extends PHPUnit_Framework_TestCase { $this->assertSame( 'wrapped', $obj->setterArgs[0] ); $obj = ObjectFactory::getObjectFromSpec( [ - 'class' => 'ObjectFactoryTestFixture', + 'class' => ObjectFactoryTestFixture::class, 'args' => [ function () { return 'unwrapped'; }, ], @@ -121,7 +123,7 @@ class ObjectFactoryTest extends PHPUnit_Framework_TestCase { */ public function testGetObjectFromClass( $args ) { $obj = ObjectFactory::getObjectFromSpec( [ - 'class' => 'ObjectFactoryTestFixture', + 'class' => ObjectFactoryTestFixture::class, 'args' => $args, ] ); $this->assertSame( $args, $obj->args );