コード例 #1
0
ファイル: persistent_test.php プロジェクト: evltuma/moodle
 public function test_properties_definition()
 {
     $expected = array('shortname' => array('type' => PARAM_TEXT, 'default' => '', 'null' => NULL_NOT_ALLOWED), 'idnumber' => array('type' => PARAM_TEXT, 'null' => NULL_NOT_ALLOWED), 'description' => array('type' => PARAM_TEXT, 'default' => '', 'null' => NULL_NOT_ALLOWED), 'descriptionformat' => array('choices' => array(FORMAT_HTML, FORMAT_MOODLE, FORMAT_PLAIN, FORMAT_MARKDOWN), 'type' => PARAM_INT, 'default' => FORMAT_HTML, 'null' => NULL_NOT_ALLOWED), 'parentid' => array('type' => PARAM_INT, 'default' => 0, 'null' => NULL_NOT_ALLOWED), 'path' => array('type' => PARAM_RAW, 'default' => '', 'null' => NULL_NOT_ALLOWED), 'sortorder' => array('type' => PARAM_INT, 'message' => new lang_string('invalidrequest', 'error'), 'null' => NULL_NOT_ALLOWED), 'competencyframeworkid' => array('type' => PARAM_INT, 'default' => 0, 'null' => NULL_ALLOWED), 'id' => array('default' => 0, 'type' => PARAM_INT, 'null' => NULL_NOT_ALLOWED), 'timecreated' => array('default' => 0, 'type' => PARAM_INT, 'null' => NULL_NOT_ALLOWED), 'timemodified' => array('default' => 0, 'type' => PARAM_INT, 'null' => NULL_NOT_ALLOWED), 'usermodified' => array('default' => 0, 'type' => PARAM_INT, 'null' => NULL_NOT_ALLOWED), 'ruletype' => array('type' => PARAM_RAW, 'default' => null, 'null' => NULL_ALLOWED), 'ruleconfig' => array('type' => PARAM_RAW, 'default' => null, 'null' => NULL_ALLOWED), 'ruleoutcome' => array('type' => PARAM_RAW, 'default' => 0, 'null' => NULL_NOT_ALLOWED), 'scaleid' => array('default' => null, 'type' => PARAM_INT, 'null' => NULL_ALLOWED), 'scaleconfiguration' => array('type' => PARAM_RAW, 'default' => null, 'null' => NULL_ALLOWED));
     $this->assertEquals($expected, core_competency_testable_persistent::properties_definition());
 }