public function test_delete_ConvertsIdActionsToInt() { $this->actionsAccess->delete(array("2", "0, 1")); $expectedActions = array(array('name' => 'action1'), array('name' => 'action3')); $actualActions = Db::fetchAll("SELECT name FROM " . Common::prefixTable('log_action')); $this->assertEquals($expectedActions, $actualActions); }
private function deleteDuplicatesFromLogAction(OutputInterface $output, $duplicateActions) { $logActionTable = Common::prefixTable('log_action'); $output->writeln("<info>Deleting duplicate actions from {$logActionTable}...</info>"); $idActions = array(); foreach ($duplicateActions as $dupeInfo) { $idActions = array_merge($idActions, $dupeInfo['duplicateIdActions']); } $this->actionsAccess->delete($idActions); }