'presetSet', 'preset' => '2', 'newLabel' => $label); buildControlCommand(new StubMonitor()); return $queries; } $q = save_label("Bob's door"); check('a REPLACE is issued', count($q), 1); check('an apostrophe is stored as typed', $q[0][1][2] ?? null, "Bob's door"); $q = save_label('Back "gate" \\ side'); check('quotes and backslashes are stored as typed', $q[0][1][2] ?? null, 'Back "gate" \\ side'); $q = save_label(array('x')); check('an array label stores nothing', count($q), 0); $_REQUEST = array('control' => 'presetSet', 'preset' => '2', 'newLabel' => 'a'); check('the preset option is given once', buildControlCommand(new StubMonitor()), ' --preset=2 --command=presetSet'); exit($failures ? 1 : 0);