}
public function provideDecompress() {
- yield '(no legacy encoding), false in false out' => [ false, false, [], false ];
yield '(no legacy encoding), empty in empty out' => [ false, '', [], '' ];
yield '(no legacy encoding), empty in empty out' => [ false, 'A', [], 'A' ];
+ yield '(no legacy encoding), error flag -> false' => [ false, 'X', [ 'error' ], false ];
yield '(no legacy encoding), string in with gzip flag returns string' => [
// gzip string below generated with gzdeflate( 'AAAABBAAA' )
false, "sttttr\002\022\000", [ 'gzip' ], 'AAAABBAAA',
);
}
+ /**
+ * @covers \MediaWiki\Storage\SqlBlobStore::decompressData
+ */
+ public function testDecompressData_InvalidArgumentException() {
+ $store = $this->getBlobStore();
+
+ $this->setExpectedException( InvalidArgumentException::class );
+ $store->decompressData( false, [] );
+ }
+
/**
* @covers \MediaWiki\Storage\SqlBlobStore::compressData
*/
* @covers \MediaWiki\Storage\SqlBlobStore::getBlob
*/
public function testSimpleStoreGetBlobSimpleRoundtripWindowsLegacyEncodingGzip( $blob ) {
+ // FIXME: fails under postgres
+ $this->markTestSkippedIfDbType( 'postgres' );
$store = $this->getBlobStore( 'windows-1252', true );
$address = $store->storeBlob( $blob );
$this->assertSame( $blob, $store->getBlob( $address ) );