array('a', 'b'))), array('save', array('runState'=>array('a', 'b'))), array('save', array('newState'=>array('a', 'b'))), array('delete', array('runState'=>array('a', 'b'))), ); foreach ($cases as $c) { $queries = array(); $packaged = array(); $action = $c[0]; $_REQUEST = $c[1]; $threw = false; try { include __DIR__.'/../../web/includes/actions/state.php'; } catch (Throwable $e) { $threw = true; } check("$action with array param does not throw", $threw, false); check("$action with array param changes nothing", count($queries) + count($packaged), 0); } echo "\n$passes passed, $failures failed\n"; exit($failures ? 1 : 0); }