Add helpful @var tags to BlockManagerTest

Without these IDEs mark method calls on the wrapped objects
as errors.

Change-Id: I4d7ee0d7475174c20a18df99ebda7ef1a3afbd56
This commit is contained in:
Thiemo Kreuz 2021-01-08 17:12:28 +01:00
parent f592c15e8f
commit 7166284835

View file

@ -70,6 +70,7 @@ class BlockManagerTest extends MediaWikiIntegrationTestCase {
* @covers ::shouldApplyCookieBlock
*/
public function testGetBlockFromCookieValue( $options, $expected ) {
/** @var BlockManager $blockManager */
$blockManager = TestingAccessWrapper::newFromObject(
$this->getBlockManager( [
'wgCookieSetOnAutoblock' => true,
@ -101,6 +102,7 @@ class BlockManagerTest extends MediaWikiIntegrationTestCase {
* @covers ::shouldApplyCookieBlock
*/
public function testTrackBlockWithCookieRemovesBlocks( $options, $expectKeepCookie ) {
/** @var BlockManager $blockManager */
$blockManager = TestingAccessWrapper::newFromObject(
$this->getBlockManager( [
'wgCookieSetOnAutoblock' => true,
@ -195,6 +197,7 @@ class BlockManagerTest extends MediaWikiIntegrationTestCase {
* @covers ::isLocallyBlockedProxy
*/
public function testIsLocallyBlockedProxy( $proxyList, $expected ) {
/** @var BlockManager $blockManager */
$blockManager = TestingAccessWrapper::newFromObject(
$this->getBlockManager( [
'wgProxyList' => $proxyList
@ -332,6 +335,7 @@ class BlockManagerTest extends MediaWikiIntegrationTestCase {
public function testGetUniqueBlocks() {
$blockId = 100;
/** @var BlockManager $blockManager */
$blockManager = TestingAccessWrapper::newFromObject( $this->getBlockManager( [] ) );
$block = $this->getMockBuilder( DatabaseBlock::class )
@ -534,6 +538,7 @@ class BlockManagerTest extends MediaWikiIntegrationTestCase {
* @covers ::shouldTrackBlockWithCookie
*/
public function testShouldTrackBlockWithCookieSystemBlock() {
/** @var BlockManager $blockManager */
$blockManager = TestingAccessWrapper::newFromObject( $this->getBlockManager( [] ) );
$this->assertFalse( $blockManager->shouldTrackBlockWithCookie(
new SystemBlock(),
@ -556,6 +561,7 @@ class BlockManagerTest extends MediaWikiIntegrationTestCase {
->willReturn( $options['autoblocking'] );
}
/** @var BlockManager $blockManager */
$blockManager = TestingAccessWrapper::newFromObject(
$this->getBlockManager( $options['blockManagerConfig'] )
);