<?php
+ /**
+ * @covers HTMLRestrictionsField
+ */
class HTMLRestrictionsFieldTest extends PHPUnit_Framework_TestCase {
+
+ use MediaWikiCoversValidator;
+
public function testConstruct() {
$field = new HTMLRestrictionsField( [ 'fieldname' => 'restrictions' ] );
$this->assertNotEmpty( $field->getLabel(), 'has a default label' );
<?php
+ /**
+ * @covers DeferredStringifier
+ */
class DeferredStringifierTest extends PHPUnit_Framework_TestCase {
+ use MediaWikiCoversValidator;
+
/**
- * @covers DeferredStringifier
* @dataProvider provideToString
*/
public function testToString( $params, $expected ) {
<?php
+ /**
+ * @covers DnsSrvDiscoverer
+ */
class DnsSrvDiscovererTest extends PHPUnit_Framework_TestCase {
+
+ use MediaWikiCoversValidator;
+
/**
- * @covers DnsSrvDiscoverer
* @dataProvider provideRecords
*/
public function testPickServer( $params, $expected ) {
use Liuggio\StatsdClient\Entity\StatsdData;
use Liuggio\StatsdClient\Sender\SenderInterface;
+ /**
+ * @covers SamplingStatsdClient
+ */
class SamplingStatsdClientTest extends PHPUnit_Framework_TestCase {
+
+ use MediaWikiCoversValidator;
+
/**
* @dataProvider samplingDataProvider
*/
use Wikimedia\Rdbms\TransactionProfiler;
use Psr\Log\LoggerInterface;
+ /**
+ * @covers \Wikimedia\Rdbms\TransactionProfiler
+ */
class TransactionProfilerTest extends PHPUnit_Framework_TestCase {
+
+ use MediaWikiCoversValidator;
+
public function testAffected() {
$logger = $this->getMockBuilder( LoggerInterface::class )->getMock();
$logger->expects( $this->exactly( 3 ) )->method( 'info' );
* dataprovider.
*/
+ /**
+ * @covers AvroValidator
+ */
class AvroValidatorTest extends PHPUnit_Framework_TestCase {
+
+ use MediaWikiCoversValidator;
+
public function setUp() {
if ( !class_exists( 'AvroSchema' ) ) {
$this->markTestSkipped( 'Avro is required to run the AvroValidatorTest' );
<?php
+
/**
- *
* @group Hash
+ *
+ * @covers MWCryptHash
*/
-
class MWCryptHashTest extends PHPUnit_Framework_TestCase {
+ use MediaWikiCoversValidator;
+
public function testHashLength() {
if ( MWCryptHash::hashAlgo() !== 'whirlpool' ) {
$this->markTestSkipped( 'Hash algorithm isn\'t whirlpool' );