���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home/rickpfrv/wiki.craftaro.com/tests/phpunit/unit/includes/cache/LinkBatchFactoryTest.php
���ѧ٧ѧ�
<?php use MediaWiki\Cache\LinkBatchFactory; use MediaWiki\Linker\LinksMigration; use MediaWiki\Logger\LoggerFactory; use MediaWiki\Page\PageReference; use MediaWiki\Page\PageReferenceValue; use Wikimedia\Rdbms\ILoadBalancer; /** * @group Cache * @covers \MediaWiki\Cache\LinkBatchFactory */ class LinkBatchFactoryTest extends MediaWikiUnitTestCase { use FactoryArgTestTrait; protected static function getFactoryClass() { return LinkBatchFactory::class; } protected static function getInstanceClass() { return LinkBatch::class; } protected static function getExtraClassArgCount() { // $arr return 1; } protected function getOverriddenMockValueForParam( ReflectionParameter $param ) { if ( $param->getName() === 'initialItems' ) { return [ [] ]; } return []; } public function testNewLinkBatch() { $factory = new LinkBatchFactory( $this->createMock( LinkCache::class ), $this->createMock( TitleFormatter::class ), $this->createMock( Language::class ), $this->createMock( GenderCache::class ), $this->createMock( ILoadBalancer::class ), $this->createMock( LinksMigration::class ), LoggerFactory::getInstance( 'LinkBatch' ) ); $linkBatch = $factory->newLinkBatch( [ new TitleValue( NS_MAIN, 'Foo' ), new PageReferenceValue( NS_TALK, 'Bar', PageReference::LOCAL ), ] ); $this->assertFalse( $linkBatch->isEmpty() ); $this->assertSame( 2, $linkBatch->getSize() ); } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0.1 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�