public function __construct($jsonData) { foreach ($jsonData['Analytics'] as $data) { $entry = ActivityByLocation::withJSON($data); $this->append($entry); } }
public function setUp() { $this->_jsonData = json_decode(file_get_contents(__DIR__ . '/../../tests/JsonResponses/ActivityByLocationJson.html'), true)['Context']['Analytics'][0]; $this->_activityByLocation = ActivityByLocation::withJSON($this->_jsonData); }