From 775bcac17220296e5d10d10178139a5884a4c7f2 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Tue, 25 Sep 2018 10:21:24 -0400 Subject: [PATCH] OutputPageTest: Don't rely on side effects of previous tests Use the proper `MediaWikiTextCase::hideDeprecated()` method. Bug: T191960 Change-Id: I974618a0bd1e11434d167820d119dcfd6e47b092 --- tests/phpunit/includes/OutputPageTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/includes/OutputPageTest.php b/tests/phpunit/includes/OutputPageTest.php index d334b73925..e7b7c76cf6 100644 --- a/tests/phpunit/includes/OutputPageTest.php +++ b/tests/phpunit/includes/OutputPageTest.php @@ -174,11 +174,12 @@ class OutputPageTest extends MediaWikiTestCase { /** * Test the actual behavior of the method (in the case where it doesn't throw, e.g., in - * production). Since it threw an exception once in this file, it won't when we call it again. + * production). * * @covers OutputPage::addScriptFile */ public function testAddDeprecatedScriptFileNoOp() { + $this->hideDeprecated( 'OutputPage::addScriptFile' ); $op = $this->newInstance(); $op->addScriptFile( 'ignored-script.js' ); -- 2.20.1