5 class RedisBagOStuffTest
extends PHPUnit_Framework_TestCase
{
6 /** @var RedisBagOStuff */
9 protected function setUp() {
11 $cache = $this->getMockBuilder( 'RedisBagOStuff' )
12 ->disableOriginalConstructor()
14 $this->cache
= TestingAccessWrapper
::newFromObject( $cache );
18 * @covers RedisBagOStuff::unserialize
19 * @dataProvider unserializeProvider
21 public function testUnserialize( $expected, $input, $message ) {
22 $actual = $this->cache
->unserialize( $input );
23 $this->assertSame( $expected, $actual, $message );
26 public function unserializeProvider() {
31 'String representation of \'-1\'',
36 'String representation of \'0\'',
41 'String representation of \'1\'',
46 'Serialized negative double',
57 * @covers RedisBagOStuff::serialize
58 * @dataProvider serializeProvider
60 public function testSerialize( $expected, $input, $message ) {
61 $actual = $this->cache
->serialize( $input );
62 $this->assertSame( $expected, $actual, $message );
65 public function serializeProvider() {
95 'String representation of 1',