Skip to content

Commit

Permalink
Merge "repo\tests: Use namespaced classes (2)"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Jun 20, 2024
2 parents 943b41f + 79f22d6 commit 48c86ca
Show file tree
Hide file tree
Showing 39 changed files with 58 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Wikibase\Repo\Tests\Actions;

use IContextSource;
use MediaWiki\Context\IContextSource;
use MediaWiki\MediaWikiServices;
use MediaWiki\Status\Status;
use MediaWiki\Title\Title;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Wikibase\Repo\Tests\Actions;

use Article;
use IContextSource;
use MediaWiki\Config\HashConfig;
use MediaWiki\Context\IContextSource;
use MediaWiki\MediaWikiServices;
use MediaWiki\Output\OutputPage;
use MediaWiki\Request\WebRequest;
Expand Down
4 changes: 2 additions & 2 deletions repo/tests/phpunit/includes/Diff/SiteLinkDiffViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
use Diff\DiffOp\DiffOpAdd;
use Diff\DiffOp\DiffOpChange;
use Diff\DiffOp\DiffOpRemove;
use MediaWiki\Context\RequestContext;
use MediaWiki\Site\HashSiteStore;
use MediaWiki\Tests\Site\TestSites;
use MediaWikiTestCaseTrait;
use RequestContext;
use TestSites;
use Wikibase\DataModel\Services\EntityId\EntityIdFormatter;
use Wikibase\Repo\Diff\SiteLinkDiffView;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace Wikibase\Repo\Tests\FederatedProperties\Diff;

use DerivativeContext;
use RequestContext;
use MediaWiki\Context\DerivativeContext;
use MediaWiki\Context\RequestContext;
use Wikibase\DataModel\Entity\Item;
use Wikibase\DataModel\Entity\ItemId;
use Wikibase\DataModel\Snak\PropertyNoValueSnak;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
namespace Wikibase\Repo\Tests\FederatedProperties\Hooks;

use DifferenceEngine;
use IContextSource;
use MediaWiki\CommentStore\CommentStoreComment;
use MediaWiki\Context\IContextSource;
use MediaWiki\Revision\MutableRevisionRecord;
use MediaWiki\Title\Title;
use PHPUnit\Framework\TestCase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Wikibase\Repo\Test\Hooks\FederatedProperties;

use MediaWiki\Context\RequestContext;
use MediaWiki\Linker\LinkRenderer;
use MediaWiki\Title\Title;
use RequestContext;
use Wikibase\DataModel\Entity\ItemId;
use Wikibase\DataModel\Entity\Property;
use Wikibase\Repo\FederatedProperties\ApiRequestExecutionException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Wikibase\Repo\Tests\FederatedProperties\Hooks;

use IContextSource;
use MediaWiki\Context\IContextSource;
use MediaWiki\Pager\HistoryPager;
use MediaWiki\Title\Title;
use PHPUnit\Framework\TestCase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare( strict_types = 1 );
namespace Wikibase\Repo\Tests\FederatedProperties\ParserOutput;

use LinkBatch;
use MediaWiki\Cache\LinkBatch;
use MediaWiki\Cache\LinkBatchFactory;
use Psr\SimpleCache\CacheInterface;
use RepoGroup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
namespace Wikibase\Repo\Tests\Hooks;

use Content;
use IContextSource;
use MediaWiki\Context\IContextSource;
use MediaWiki\Context\RequestContext;
use MediaWiki\MediaWikiServices;
use MediaWiki\Request\FauxRequest;
use MediaWiki\Revision\SlotRecord;
use MediaWiki\Status\Status;
use MediaWiki\Title\Title;
use MediaWiki\User\User;
use MediaWikiIntegrationTestCase;
use RequestContext;
use Wikibase\DataModel\Entity\EntityDocument;
use Wikibase\DataModel\Entity\EntityId;
use Wikibase\DataModel\Entity\EntityRedirect;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

namespace Wikibase\Repo\Tests\Hooks\Helpers;

use DerivativeContext;
use MediaWiki\Context\DerivativeContext;
use MediaWiki\Context\RequestContext;
use MediaWiki\Output\OutputPage;
use MediaWiki\Permissions\SimpleAuthority;
use MediaWiki\Permissions\UltimateAuthority;
Expand All @@ -11,7 +12,6 @@
use MediaWiki\Title\Title;
use MediaWiki\User\UserIdentityValue;
use MediaWikiIntegrationTestCase;
use RequestContext;
use Wikibase\Repo\Hooks\Helpers\OutputPageEditability;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
namespace Wikibase\Repo\Tests\Hooks;

use HtmlArmor;
use MediaWiki\Context\RequestContext;
use MediaWiki\Linker\LinkRenderer;
use MediaWiki\SpecialPage\SpecialPage;
use MediaWiki\Title\Title;
use RequestContext;
use Wikibase\Lib\Store\EntityUrlLookup;
use Wikibase\Repo\WikibaseRepo;
use Wikimedia\TestingAccessWrapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
declare( strict_types = 1 );
namespace Wikibase\Repo\Tests\Hooks;

use MediaWiki\Context\RequestContext;
use MediaWiki\Interwiki\InterwikiLookup;
use MediaWiki\Linker\LinkRenderer;
use MediaWiki\MediaWikiServices;
use MediaWiki\Title\Title;
use MediaWikiLangTestCase;
use RequestContext;
use Wikibase\DataAccess\DatabaseEntitySource;
use Wikibase\DataAccess\EntitySourceDefinitions;
use Wikibase\DataModel\Entity\BasicEntityIdParser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace Wikibase\Repo\Tests\Hooks;

use IContextSource;
use MediaWiki\Context\IContextSource;
use MediaWiki\Context\RequestContext;
use MediaWiki\Html\Html;
use MediaWiki\Page\PageProps;
use MediaWiki\Site\Site;
use MediaWiki\Site\SiteLookup;
use MediaWiki\Title\Title;
use RequestContext;
use Wikibase\DataModel\Entity\Item;
use Wikibase\DataModel\Entity\ItemId;
use Wikibase\Lib\Store\EntityIdLookup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Wikibase\Repo\Tests\Hooks;

use MediaWiki\Context\RequestContext;
use MediaWiki\Output\OutputPage;
use MediaWiki\Request\FauxRequest;
use MediaWiki\Title\Title;
Expand All @@ -13,7 +14,6 @@
use NullHttpRequestFactory;
use NullStatsdDataFactory;
use PHPUnit\Framework\MockObject\MockObject;
use RequestContext;
use Wikibase\DataModel\Entity\Item;
use Wikibase\DataModel\Entity\ItemId;
use Wikibase\Lib\EntityFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Wikibase\Repo\Tests\Hooks;

use IContextSource;
use MediaWiki\Context\IContextSource;
use MediaWiki\Context\RequestContext;
use MediaWiki\Output\OutputPage;
use RequestContext;
use Wikibase\DataModel\Entity\ItemId;
use Wikibase\DataModel\Entity\ItemIdParser;
use Wikibase\Repo\Hooks\Helpers\OutputPageEntityViewChecker;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Wikibase\Repo\Tests\Hooks;

use ContextSource;
use HtmlArmor;
use MediaWiki\Context\ContextSource;
use MediaWiki\Language\RawMessage;
use MediaWiki\Specials\SpecialSearch;
use MediaWiki\Title\Title;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Wikibase\Repo\Tests\Hooks;

use MediaWiki\Message\Message;
use MediaWiki\Title\Title;
use MediaWikiIntegrationTestCase;
use Message;
use Psr\Log\LoggerInterface;
use Skin;
use Wikibase\DataModel\Entity\EntityId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@

namespace Wikibase\Repo\Tests\Interactors;

use IContextSource;
use MediaWiki\Context\IContextSource;
use MediaWiki\Context\RequestContext;
use MediaWiki\MediaWikiServices;
use MediaWiki\Permissions\Authority;
use MediaWiki\Permissions\RateLimiter;
use MediaWiki\Site\HashSiteStore;
use MediaWiki\Status\Status;
use MediaWiki\Tests\Site\TestSites;
use MediaWiki\Title\Title;
use MediaWiki\User\TempUser\CreateStatus;
use MediaWiki\User\TempUser\TempUserCreator;
use MediaWiki\User\User;
use MediaWikiIntegrationTestCase;
use NullStatsdDataFactory;
use RequestContext;
use TestSites;
use Wikibase\DataModel\Entity\EntityId;
use Wikibase\DataModel\Entity\ItemId;
use Wikibase\DataModel\Services\Diff\EntityDiffer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

namespace Wikibase\Repo\Tests\Interactors;

use IContextSource;
use MediaWiki\Context\IContextSource;
use MediaWiki\Context\RequestContext;
use MediaWiki\MediaWikiServices;
use MediaWiki\Request\FauxRequest;
use MediaWiki\Status\Status;
use MediaWiki\Title\Title;
use MediaWiki\User\TempUser\CreateStatus;
use MediaWiki\User\TempUser\TempUserCreator;
use MediaWiki\User\User;
use RequestContext;
use Wikibase\DataModel\Entity\EntityId;
use Wikibase\DataModel\Entity\EntityRedirect;
use Wikibase\DataModel\Entity\Item;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Wikibase\Repo\Tests\Interactors;

use MediaWiki\Context\RequestContext;
use MediaWiki\Request\FauxRequest;
use MediaWiki\User\User;
use RequestContext;
use Wikibase\Repo\Interactors\TokenCheckException;
use Wikibase\Repo\Interactors\TokenCheckInteractor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
namespace Wikibase\Repo\Tests\LinkedData;

use DataValues\Serializers\DataValueSerializer;
use DerivativeContext;
use HtmlCacheUpdater;
use HttpError;
use MediaWiki\Cache\HTMLCacheUpdater;
use MediaWiki\Context\DerivativeContext;
use MediaWiki\Context\RequestContext;
use MediaWiki\Output\OutputPage;
use MediaWiki\Request\FauxRequest;
use MediaWiki\Request\FauxResponse;
Expand All @@ -16,7 +17,6 @@
use MediaWiki\Title\Title;
use MediaWikiIntegrationTestCase;
use Psr\Log\NullLogger;
use RequestContext;
use Wikibase\DataAccess\DatabaseEntitySource;
use Wikibase\DataAccess\EntitySourceDefinitions;
use Wikibase\DataModel\Entity\EntityId;
Expand Down Expand Up @@ -200,7 +200,7 @@ protected function newHandler(): EntityDataRequestHandler {
],
$entityTitleStoreLookup
);
$mockHtmlCacheUpdater = $this->createMock( HtmlCacheUpdater::class );
$mockHtmlCacheUpdater = $this->createMock( HTMLCacheUpdater::class );

$entityTypesWithoutRdfOutput = [ 'property' ];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Wikibase\Repo\Tests\Localizer;

use InvalidArgumentException;
use Message;
use MediaWiki\Message\Message;
use PHPUnit\Framework\TestCase;
use Wikibase\Repo\ChangeOp\ChangeOpApplyException;
use Wikibase\Repo\Localizer\ChangeOpApplyExceptionLocalizer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Wikibase\Repo\Tests\Localizer;

use InvalidArgumentException;
use Message;
use MediaWiki\Message\Message;
use Wikibase\Repo\ChangeOp\Deserialization\ChangeOpDeserializationException;
use Wikibase\Repo\Localizer\ChangeOpDeserializationExceptionLocalizer;

Expand Down
2 changes: 1 addition & 1 deletion repo/tests/phpunit/includes/Merge/MergeFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Wikibase\Repo\Tests\Merge;

use MediaWiki\Site\HashSiteStore;
use TestSites;
use MediaWiki\Tests\Site\TestSites;
use Wikibase\DataModel\Entity\Item;
use Wikibase\DataModel\Entity\ItemId;
use Wikibase\DataModel\Services\Statement\GuidGenerator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Wikibase\Repo\Tests\ParserOutput\PlaceholderExpander;

use IContextSource;
use MediaWiki\Context\IContextSource;
use MediaWiki\MediaWikiServices;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion repo/tests/phpunit/includes/Rdf/RdfBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace Wikibase\Repo\Tests\Rdf;

use MediaWiki\Context\RequestContext;
use MediaWiki\MediaWikiServices;
use MediaWiki\Revision\SlotRecord;
use MediaWiki\Site\SiteLookup;
use MediaWikiIntegrationTestCase;
use RequestContext;
use Wikibase\DataAccess\DatabaseEntitySource;
use Wikibase\DataAccess\EntitySourceDefinitions;
use Wikibase\DataModel\Entity\EntityDocument;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

namespace Wikibase\Repo\Tests\Specials\HTMLForm;

use HTMLForm;
use MediaWiki\HTMLForm\HTMLForm;
use MediaWiki\Message\Message;
use MediaWikiIntegrationTestCase;
use Wikibase\Repo\Specials\HTMLForm\HTMLAliasesField;

Expand Down Expand Up @@ -70,7 +71,7 @@ public function testRemovesEmptyValues_WhenFilters() {
public function testValidationFailsWithGenericMessage_WhenRequiredAndEmptyArrayGivenAsValue() {
$field = $this->createField( [ 'required' => true ] );

/** @var \Message $failureMessage */
/** @var Message $failureMessage */
$failureMessage = $field->validate( [], [] );

$this->assertSame( 'htmlform-required', $failureMessage->getKey() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Wikibase\Repo\Tests\Specials\HTMLForm;

use HTMLForm;
use MediaWiki\HTMLForm\HTMLForm;
use MediaWikiIntegrationTestCase;
use Wikibase\Repo\Specials\HTMLForm\HTMLContentLanguageField;

Expand Down
Loading

0 comments on commit 48c86ca

Please sign in to comment.