unserialize() public method

Unserializes the given string and turn it back to specific objects.
public unserialize ( string $data ) : array
$data string Serialized string to be converted.
return array
 public function testUnserializeShouldParseStringAndCallConverterSuccessfully()
 {
     $converter = m::mock(Converter::class);
     $serializer = new Serializer($converter);
     $attributes = ['some', 'attributes'];
     $replaced = ['awsome', 'attrs'];
     $converter->shouldReceive('toMongoTypes')->with($attributes)->once()->andReturn($replaced);
     $this->assertEquals($replaced, $serializer->unserialize(serialize($attributes)));
 }