/** * @depends testExchangeArray * @param SampleEntity $entity */ public function testToArray($entity) { $data = $entity->toArray(); foreach ($data as $key => $value) { if (isset($this->_data[$key])) { $this->assertEquals($this->_data[$key], $value); } } }