Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 22... Línea 22...
22
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
22
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23
 */
23
 */
Línea 24... Línea 24...
24
 
24
 
Línea -... Línea 25...
-
 
25
namespace core_competency\external;
25
namespace core_competency\external;
26
 
26
 
27
use core\invalid_persistent_exception;
27
use core_competency\api;
28
use core_competency\api;
28
use core_competency\course_competency_settings;
-
 
29
use core_competency\external;
29
use core_competency\course_competency_settings;
30
use core_competency\invalid_persistent_exception;
30
use core_competency\external;
31
use core_competency\plan;
31
use core_competency\plan;
32
use core_competency\plan_competency;
32
use core_competency\plan_competency;
33
use core_competency\related_competency;
33
use core_competency\related_competency;
Línea 48... Línea 48...
48
 *
48
 *
49
 * @package    core_competency
49
 * @package    core_competency
50
 * @copyright  2016 Frédéric Massart - FMCorz.net
50
 * @copyright  2016 Frédéric Massart - FMCorz.net
51
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
51
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
52
 */
52
 */
53
class external_test extends externallib_advanced_testcase {
53
final class external_test extends externallib_advanced_testcase {
Línea 54... Línea 54...
54
 
54
 
55
    /** @var \stdClass $creator User with enough permissions to create insystem context. */
55
    /** @var \stdClass $creator User with enough permissions to create insystem context. */
Línea 56... Línea 56...
56
    protected $creator = null;
56
    protected $creator = null;
Línea 103... Línea 103...
103
    /**
103
    /**
104
     * Setup function- we will create a course and add an assign instance to it.
104
     * Setup function- we will create a course and add an assign instance to it.
105
     */
105
     */
106
    protected function setUp(): void {
106
    protected function setUp(): void {
107
        global $DB, $CFG;
107
        global $DB, $CFG;
-
 
108
        parent::setUp();
Línea 108... Línea 109...
108
 
109
 
Línea 109... Línea 110...
109
        $this->resetAfterTest(true);
110
        $this->resetAfterTest(true);
110
 
111
 
Línea 618... Línea 619...
618
 
619
 
619
        // Changing the framework where the scale is used.
620
        // Changing the framework where the scale is used.
620
        try {
621
        try {
621
            $result = $this->update_competency_framework($f2->get('id'), 4, true);
622
            $result = $this->update_competency_framework($f2->get('id'), 4, true);
622
            $this->fail('The scale cannot be changed once used.');
623
            $this->fail('The scale cannot be changed once used.');
623
        } catch (\core\invalid_persistent_exception $e) {
624
        } catch (invalid_persistent_exception $e) {
624
            $this->assertMatchesRegularExpression('/scaleid/', $e->getMessage());
625
            $this->assertMatchesRegularExpression('/scaleid/', $e->getMessage());
625
        }
626
        }
Línea 626... Línea 627...
626
    }
627
    }