3 use Wikimedia\TestingAccessWrapper
;
6 * @covers ApiBlockInfoTrait
8 class ApiBlockInfoTraitTest
extends MediaWikiTestCase
{
10 public function testGetBlockInfo() {
12 $mock = $this->getMockForTrait( ApiBlockInfoTrait
::class );
13 $info = TestingAccessWrapper
::newFromObject( $mock )->getBlockInfo( $block );
19 'blockexpiry' => 'infinite',
20 'blockpartial' => false,
22 $this->assertArraySubset( $subset, $info );
25 public function testGetBlockInfoPartial() {
26 $mock = $this->getMockForTrait( ApiBlockInfoTrait
::class );
31 $info = TestingAccessWrapper
::newFromObject( $mock )->getBlockInfo( $block );
37 'blockexpiry' => 'infinite',
38 'blockpartial' => true,
40 $this->assertArraySubset( $subset, $info );