/** * Test getModules */ public function testGetModules() { $setting = new Phprojekt_Setting(); $data = array(); $data[] = array('name' => 'User', 'label' => Phprojekt::getInstance()->translate('User')); $data[] = array('name' => 'Notification', 'label' => Phprojekt::getInstance()->translate('Notification')); $data[] = array('name' => 'Timecard', 'label' => Phprojekt::getInstance()->translate('Timecard')); $this->assertEquals($data, $setting->getModules()); }
/** * Returns all the modules that contain settings. * * Returns a list of modules that have a Setting class, with: * <pre> * - name => Name of the module. * - label => Display for the module. * </pre> * * The return is in JSON format. * * @return void */ public function jsonGetModulesAction() { $setting = new Phprojekt_Setting(); $data = $setting->getModules(); Phprojekt_Converter_Json::echoConvert($data); }