public function testSerializeBinString()
 {
     $value = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" . "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" . "01234567890123456789012345678901234567890123456789012345";
     $expected = "T" . "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" . "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" . "01234567890123456789012345678901234567890123456789012345" . "q.";
     $data = $this->adapter->serialize($value);
     $this->assertEquals($expected, $data);
 }
 public function testSerializeObject()
 {
     $value = new \stdClass();
     $value->test = 'test';
     $value->test2 = 2;
     $expected = "(dp0\r\n" . "S'test'\r\n" . "p1\r\n" . "g1\r\n" . "sS'test2'\r\n" . "p2\r\n" . "I2\r\n" . "s.";
     $data = $this->adapter->serialize($value);
     $this->assertEquals($expected, $data);
 }
 public function testUnserialzeInvalid()
 {
     $value = 'not a serialized string';
     $this->setExpectedException('Zend\\Serializer\\Exception\\RuntimeException', "Invalid or unknown opcode 'n'");
     $this->adapter->unserialize($value);
 }