/**
  * @see ChangeRow::unserializeInfo()
  *
  * Overwritten to use the array representation of the diff.
  *
  * @since 0.4
  * @param string $str
  * @return array the info array
  */
 public function unserializeInfo($str)
 {
     static $factory = null;
     if ($factory == null) {
         $factory = new EntityTypeAwareDiffOpFactory(array($this, 'objectifyArrays'));
     }
     $info = parent::unserializeInfo($str);
     if (isset($info['diff']) && is_array($info['diff'])) {
         $info['diff'] = $factory->newFromArray($info['diff']);
     }
     return $info;
 }
 public function testCanNotUnserializeNonArrays()
 {
     $change = new ChangeRow(array('object_id' => 'Q1'));
     \MediaWiki\suppressWarnings();
     $info = $change->unserializeInfo('s:5:"value";');
     \MediaWiki\restoreWarnings();
     $this->assertSame(array(), $info);
 }