OutputPageTest: Don't rely on side effects of previous tests
authorC. Scott Ananian <cscott@cscott.net>
Tue, 25 Sep 2018 14:21:24 +0000 (10:21 -0400)
committerC. Scott Ananian <cscott@cscott.net>
Tue, 25 Sep 2018 14:22:52 +0000 (10:22 -0400)
Use the proper `MediaWikiTextCase::hideDeprecated()` method.

Bug: T191960
Change-Id: I974618a0bd1e11434d167820d119dcfd6e47b092

tests/phpunit/includes/OutputPageTest.php

index d334b73..e7b7c76 100644 (file)
@@ -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' );