Page MenuHomeWickedGov Phorge

HTMLUserTextFieldAllowingGlobalBlockIdsTest.php
No OneTemporary

Size
893 B
Referenced Files
None
Subscribers
None

HTMLUserTextFieldAllowingGlobalBlockIdsTest.php

<?php
namespace MediaWiki\Extension\GlobalBlocking\Test\Unit\Widget;
use MediaWiki\Extension\GlobalBlocking\Widget\HTMLUserTextFieldAllowingGlobalBlockIds;
use MediaWiki\HTMLForm\HTMLForm;
use MediaWikiUnitTestCase;
/**
* @covers \MediaWiki\Extension\GlobalBlocking\Widget\HTMLUserTextFieldAllowingGlobalBlockIds
*/
class HTMLUserTextFieldAllowingGlobalBlockIdsTest extends MediaWikiUnitTestCase {
/** @dataProvider provideValidateForBlockId */
public function testValidateForBlockId( $value ) {
$objectUnderTest = new HTMLUserTextFieldAllowingGlobalBlockIds( [
'parent' => $this->createMock( HTMLForm::class ),
'name' => 'address',
] );
$this->assertTrue( $objectUnderTest->validate( $value, [] ) );
}
public static function provideValidateForBlockId() {
return [
'Block ID with one digit' => [ '#1' ],
'Block ID with several digits' => [ '#123455' ],
];
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Jul 3, 19:15 (1 d, 13 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
98/9a/75f0778e6b0a1f13d15637b295c5
Default Alt Text
HTMLUserTextFieldAllowingGlobalBlockIdsTest.php (893 B)

Event Timeline