From 6d9e7c07e5316731f72d18cf0a7ca1139a4de93a Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Sat, 2 May 2020 16:56:09 -0700 Subject: [PATCH] Tests: Always set Skin VectorTemplate relies on many of SkinVector's methods. To future proof these tests we need to set the skin in the mocked object. Bug: T251212 Change-Id: Ifd9bbc9c909626ecfe8ccd085673bc777423d560 --- tests/phpunit/integration/VectorTemplateTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/integration/VectorTemplateTest.php b/tests/phpunit/integration/VectorTemplateTest.php index 3cde7fb83..80e6ba0c1 100644 --- a/tests/phpunit/integration/VectorTemplateTest.php +++ b/tests/phpunit/integration/VectorTemplateTest.php @@ -26,6 +26,7 @@ class VectorTemplateTest extends MediaWikiIntegrationTestCase { new TemplateParser(), true ); + $template->set( 'skin', new \SkinVector() ); return $template; } @@ -144,7 +145,6 @@ class VectorTemplateTest extends MediaWikiIntegrationTestCase { 'variants' => [], 'views' => [], ] ); - $vectorTemplate->set( 'skin', new \SkinVector() ); $vectorTemplate->set( 'userlangattributes', $langAttrs ); $openVectorTemplate = TestingAccessWrapper::newFromObject( $vectorTemplate );