Minor cleanup in ApiBlockTest
authorAryeh Gregor <ayg@aryeh.name>
Thu, 4 Oct 2018 12:55:55 +0000 (15:55 +0300)
committerAryeh Gregor <ayg@aryeh.name>
Thu, 4 Oct 2018 12:55:55 +0000 (15:55 +0300)
Use tablesUsed instead of cleaning up ourselves.

Change-Id: Ibe470a8f292d65ceeaa098d5c033b8585501a9f3

tests/phpunit/includes/api/ApiBlockTest.php

index 9980f3a..07e861f 100644 (file)
@@ -14,20 +14,12 @@ class ApiBlockTest extends ApiTestCase {
                parent::setUp();
                $this->tablesUsed = array_merge(
                        $this->tablesUsed,
-                       [ 'change_tag', 'change_tag_def', 'logging' ]
+                       [ 'ipblocks', 'change_tag', 'change_tag_def', 'logging' ]
                );
 
                $this->mUser = $this->getMutableTestUser()->getUser();
        }
 
-       protected function tearDown() {
-               $block = Block::newFromTarget( $this->mUser->getName() );
-               if ( !is_null( $block ) ) {
-                       $block->delete();
-               }
-               parent::tearDown();
-       }
-
        protected function getTokens() {
                return $this->getTokenList( self::$users['sysop'] );
        }