Proyectos de Subversion Moodle

Rev

Rev 11 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 11 Rev 1441
Línea 21... Línea 21...
21
 *
21
 *
22
 * @author Peter Dias
22
 * @author Peter Dias
23
 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
23
 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
24
 * @package mod_feedback
24
 * @package mod_feedback
25
 */
25
 */
26
class create_template_form_test extends \advanced_testcase {
26
final class create_template_form_test extends \advanced_testcase {
27
    /**
27
    /**
28
     * Run the basic setup for the test
28
     * Run the basic setup for the test
29
     */
29
     */
30
    public function setup_instance(): array {
30
    public function setup_instance(): array {
31
        global $DB, $PAGE;
31
        global $DB, $PAGE;
Línea 100... Línea 100...
100
    /**
100
    /**
101
     * Provider for the test_createtemplate_form_with_modified_capabilities
101
     * Provider for the test_createtemplate_form_with_modified_capabilities
102
     *
102
     *
103
     * @return array
103
     * @return array
104
     */
104
     */
105
    public function createtemplate_form_with_modified_capabilities_provider(): array {
105
    public static function createtemplate_form_with_modified_capabilities_provider(): array {
106
        return [
106
        return [
107
            "Manager without edititems permission cannot create any templates" => [
107
            "Manager without edititems permission cannot create any templates" => [
108
                ['mod/feedback:edititems'], false
108
                ['mod/feedback:edititems'], false
109
            ],
109
            ],
110
            "Manager without createprivatetemplate permission creating public template" => [
110
            "Manager without createprivatetemplate permission creating public template" => [
Línea 178... Línea 178...
178
    /**
178
    /**
179
     * Provider for the test_createtemplate_form
179
     * Provider for the test_createtemplate_form
180
     *
180
     *
181
     * @return array
181
     * @return array
182
     */
182
     */
183
    public function createtemplate_form_provider(): array {
183
    public static function createtemplate_form_provider(): array {
184
        return [
184
        return [
185
            'Create a private template as an admin' => [
185
            'Create a private template as an admin' => [
186
                'admin', false
186
                'admin', false
187
            ],
187
            ],
188
            'Create a public template as an admin' => [
188
            'Create a public template as an admin' => [