Example #1
0
 /**
  * @return array
  */
 public function toArray()
 {
     $data = $this->record->getData();
     foreach ($data as &$value) {
         if ($value instanceof HasToArray) {
             $value = $value->toArray();
         }
     }
     return $data;
 }
Example #2
0
 /**
  * @test
  */
 public function testUnsetProperty()
 {
     $storage = new Record(['nickname' => 'foo']);
     $storage->unsetProperty('nickname');
     $this->assertEquals([], $storage->getData());
 }