run($inputJSON); /** @var \remote_plugin_struct $remote */ $remote = plugin_load('remote', 'struct'); $rows = $remote->getAggregationData( ['swarm'], ['*'] ); $expectedRows = [ 'swarm.date' => '2018-05-25', 'swarm.json' => $inputJSON, 'swarm.locname' => 'Stiftung Für Effektiven Altruismus', 'swarm.checkinid' => 'May 25, 2018 at 04:32PM', 'swarm.shout' => '', 'swarm.time' => '2018-05-25 16:32', 'swarm.service' => 'IFTTT', ]; // $this->assertTrue($actualOK, 'single event, initially creating the schema'); $this->assertEquals($rows[0], $expectedRows); } }