* @group Cache
* @covers MessageBlobStore
*/
-class MessageBlobStoreTest extends PHPUnit_Framework_TestCase {
+class MessageBlobStoreTest extends PHPUnit\Framework\TestCase {
+
+ use MediaWikiCoversValidator;
protected function setUp() {
parent::setUp();
// MediaWiki tests defaults $wgMainWANCache to CACHE_NONE.
// Use hash instead so that caching is observed
- $this->wanCache = $this->getMockBuilder( 'WANObjectCache' )
+ $this->wanCache = $this->getMockBuilder( WANObjectCache::class )
->setConstructorArgs( [ [
'cache' => new HashBagOStuff(),
'pool' => 'test',
}
protected function makeBlobStore( $methods = null, $rl = null ) {
- $blobStore = $this->getMockBuilder( 'MessageBlobStore' )
+ $blobStore = $this->getMockBuilder( MessageBlobStore::class )
->setConstructorArgs( [ $rl ] )
->setMethods( $methods )
->getMock();
$this->assertEquals( '{"foo":"Example"}', $blob, 'Generated blob' );
}
+ /**
+ * Seems to fail sometimes (T176097).
+ *
+ * @group Broken
+ */
public function testGetBlobCached() {
$module = $this->makeModule( [ 'example' ] );
$rl = new ResourceLoader();