5 class RedisBagOStuffTest
extends MediaWikiTestCase
{
6 /** @var RedisBagOStuff */
9 protected function setUp() {
11 $this->cache
= TestingAccessWrapper
::newFromObject( new RedisBagOStuff( [ 'servers' => [] ] ) );
15 * @covers RedisBagOStuff::unserialize
16 * @dataProvider unserializeProvider
18 public function testUnserialize( $expected, $input, $message ) {
19 $actual = $this->cache
->unserialize( $input );
20 $this->assertSame( $expected, $actual, $message );
23 public function unserializeProvider() {
28 'String representation of \'-1\'',
33 'String representation of \'0\'',
38 'String representation of \'1\'',
43 'Serialized negative double',
54 * @covers RedisBagOStuff::serialize
55 * @dataProvider serializeProvider
57 public function testSerialize( $expected, $input, $message ) {
58 $actual = $this->cache
->serialize( $input );
59 $this->assertSame( $expected, $actual, $message );
62 public function serializeProvider() {
92 'String representation of 1',