Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 44... Línea 44...
44
 *
44
 *
45
 * @package   mod_forum
45
 * @package   mod_forum
46
 * @copyright Simey Lameze <simey@moodle.com>
46
 * @copyright Simey Lameze <simey@moodle.com>
47
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
47
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
48
 */
48
 */
49
class custom_completion_test extends advanced_testcase {
49
final class custom_completion_test extends advanced_testcase {
Línea 50... Línea 50...
50
 
50
 
Línea 51... Línea 51...
51
    use \mod_forum_tests_generator_trait;
51
    use \mod_forum_tests_generator_trait;
52
 
52
 
53
    /**
53
    /**
54
     * Data provider for get_state().
54
     * Data provider for get_state().
55
     *
55
     *
56
     * @return array[]
56
     * @return array[]
57
     */
57
     */
58
    public function get_state_provider(): array {
58
    public static function get_state_provider(): array {
59
        return [
59
        return [
60
            'Undefined rule' => [
60
            'Undefined rule' => [
61
                'somenonexistentrule', 0, COMPLETION_TRACKING_NONE, 0, 0, 0, null, coding_exception::class
61
                'somenonexistentrule', 0, COMPLETION_TRACKING_NONE, 0, 0, 0, null, coding_exception::class
Línea 212... Línea 212...
212
    /**
212
    /**
213
     * Data provider for test_get_available_custom_rules().
213
     * Data provider for test_get_available_custom_rules().
214
     *
214
     *
215
     * @return array[]
215
     * @return array[]
216
     */
216
     */
217
    public function get_available_custom_rules_provider(): array {
217
    public static function get_available_custom_rules_provider(): array {
218
        return [
218
        return [
219
            'Completion discussions available' => [
219
            'Completion discussions available' => [
220
                COMPLETION_ENABLED, ['completiondiscussions']
220
                COMPLETION_ENABLED, ['completiondiscussions']
221
            ],
221
            ],
222
            'Completion discussions not available' => [
222
            'Completion discussions not available' => [