Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 42... Línea 42...
42
 *
42
 *
43
 * @package   mod_assign
43
 * @package   mod_assign
44
 * @copyright Simey Lameze <simey@moodle.com>
44
 * @copyright Simey Lameze <simey@moodle.com>
45
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
45
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
46
 */
46
 */
47
class custom_completion_test extends advanced_testcase {
47
final class custom_completion_test extends advanced_testcase {
Línea 48... Línea 48...
48
 
48
 
49
    // Use the generator helper.
49
    // Use the generator helper.
Línea 50... Línea 50...
50
    use \mod_assign_test_generator;
50
    use \mod_assign_test_generator;
51
 
51
 
52
    /**
52
    /**
53
     * Data provider for get_state().
53
     * Data provider for get_state().
54
     *
54
     *
55
     * @return array[]
55
     * @return array[]
56
     */
56
     */
57
    public function get_state_provider(): array {
57
    public static function get_state_provider(): array {
58
        return [
58
        return [
59
            'Undefined rule' => [
59
            'Undefined rule' => [
60
                'somenonexistentrule', COMPLETION_DISABLED, false, null, coding_exception::class
60
                'somenonexistentrule', COMPLETION_DISABLED, false, null, coding_exception::class
Línea 198... Línea 198...
198
    /**
198
    /**
199
     * Data provider for test_get_available_custom_rules().
199
     * Data provider for test_get_available_custom_rules().
200
     *
200
     *
201
     * @return array[]
201
     * @return array[]
202
     */
202
     */
203
    public function get_available_custom_rules_provider(): array {
203
    public static function get_available_custom_rules_provider(): array {
204
        return [
204
        return [
205
            'Completion submit available' => [
205
            'Completion submit available' => [
206
                COMPLETION_ENABLED, ['completionsubmit']
206
                COMPLETION_ENABLED, ['completionsubmit']
207
            ],
207
            ],
208
            'Completion submit not available' => [
208
            'Completion submit not available' => [