public function testGetSetOptionOptions() { $ops = InstructionControl::getOptions(); $k = genSaneGuid(); $v = genSaneGuid(); InstructionControl::setOptions(array($k => $v)); $this->assertEquals($v, InstructionControl::getOption($k)); $newOps = array_merge($ops, array($k => $v)); InstructionControl::setOptions($newOps); foreach (InstructionControl::getOptions() as $k => $v) { $this->assertEquals($newOps[$k], $v); } InstructionControl::setOptions($ops); }
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ header('Content-type: text/html; charset=UTF-8'); session_start(); require_once dirname(__FILE__) . '/../config/icdemo.defines.php'; require_once INSTRUCTIONCONTROL__LIBRARY_DIR . '/markdown.php'; require_once INSTRUCTIONCONTROL__LIBRARY_DIR . '/instructioncontrol/InstructionControl.class.php'; require_once INSTRUCTIONCONTROL__LIBRARY_DIR . '/instructioncontrol/InstructionControl_Utils.class.php'; require_once INSTRUCTIONCONTROL__LIBRARY_DIR . '/dwoo/dwooAutoload.php'; InstructionControl::setOptions(array('APE_CONFIG_SERVER' => INSTRUCTIONCONTROL__APE_CONFIG_SERVER, 'PDO_DATABASE_CONNECTION_STRING' => INSTRUCTIONCONTROL__PDO_DATABASE_CONNECTION_STRING, 'PDO_DATABASE_USERNAME' => INSTRUCTIONCONTROL__PDO_DATABASE_USERNAME, 'PDO_DATABASE_PASSWORD' => INSTRUCTIONCONTROL__PDO_DATABASE_PASSWORD)); class InstructionControl_Utils_Controller_Ic extends InstructionControl_Utils_Controller { protected function acquireData($params, $userRec) { $data = parent::acquireData($params, $userRec); $data['config']['google_maps_api_key'] = GOOGLE_MAPS_API_KEY; for ($i = 1; $i <= 7; $i++) { $data['help'][] = markdown(file_get_contents('./help_doc_' . $i . '.markdown.text')); } return $data; } } $controller = new InstructionControl_Utils_Controller_Ic(new InstructionControl_Utils_ViewRenderer_Dwoo(), 'templ.xhtml'); $routerConfig = array('GET' => array('/:channelset' => array($controller, 'restGetChannelset'), '/:channelset/user' => array($controller, 'restGetChannelsetUser'), '/:channelset/user/:communication_key' => array($controller, 'restGetChannelsetUserCommunicationkey'), '/:channelset/:channel/:instruction' => array($controller, 'restGetChannelsetChannelInstruction'), '/:channelset/:channel' => array($controller, 'restGetChannelsetChannel'), '/' => array($controller, 'restRedirect'), '' => array($controller, 'restRedirect')), 'POST' => array('/:channelset/:channel' => array($controller, 'restPostChannelsetChannel')), 'PUT' => array('/:channelset/user/me' => array($controller, 'restPutChannelsetUserMe'))); $requestMethodOverride = array_key_exists('_REQUEST_METHOD', $_REQUEST) ? $_REQUEST['_REQUEST_METHOD'] : null;