From e65a5b58821873fdfdd15a4de6c1590fbea9a5fd Mon Sep 17 00:00:00 2001 From: Thalia Date: Mon, 13 May 2019 15:18:07 +0100 Subject: Rename Block to MediaWiki\Block\DatabaseBlock Keep Block as a deprecated class alias for DatabaseBlock. Update calls to the Block constructor and Block static methods from external classes. Also update documentation in several places that refer to blocks as Blocks. Bug: T222737 Change-Id: I6d96b63ca0a84bee19486471e0a16a53a79d768a --- tests/phpunit/includes/api/ApiMoveTest.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/phpunit/includes/api/ApiMoveTest.php') diff --git a/tests/phpunit/includes/api/ApiMoveTest.php b/tests/phpunit/includes/api/ApiMoveTest.php index d437a525a068..d880923d3fd1 100644 --- a/tests/phpunit/includes/api/ApiMoveTest.php +++ b/tests/phpunit/includes/api/ApiMoveTest.php @@ -1,5 +1,7 @@ assertNull( Block::newFromTarget( '127.0.0.1' ), 'Sanity check' ); + $this->assertNull( DatabaseBlock::newFromTarget( '127.0.0.1' ), 'Sanity check' ); - $block = new Block( [ + $block = new DatabaseBlock( [ 'address' => self::$users['sysop']->getUser()->getName(), 'by' => self::$users['sysop']->getUser()->getId(), 'reason' => 'Capriciousness', @@ -156,7 +158,7 @@ class ApiMoveTest extends ApiTestCase { $this->fail( 'Expected exception not thrown' ); } catch ( ApiUsageException $ex ) { $this->assertSame( 'You have been blocked from editing.', $ex->getMessage() ); - $this->assertNotNull( Block::newFromTarget( '127.0.0.1' ), 'Autoblock spread' ); + $this->assertNotNull( DatabaseBlock::newFromTarget( '127.0.0.1' ), 'Autoblock spread' ); } finally { $block->delete(); self::$users['sysop']->getUser()->clearInstanceCache(); -- cgit v1.2.3