Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 98... Línea 98...
98
     * @param string[] $rules The custom completion rules.
98
     * @param string[] $rules The custom completion rules.
99
     * @param int[] $rulestates The completion states of these custom completion rules.
99
     * @param int[] $rulestates The completion states of these custom completion rules.
100
     * @param int $invokecount Expected invoke count of get_state().
100
     * @param int $invokecount Expected invoke count of get_state().
101
     * @param int $state The expected overall completion state
101
     * @param int $state The expected overall completion state
102
     */
102
     */
103
    public function test_get_overall_completion_state(array $rules, array $rulestates, int $invokecount, int $state) {
103
    public function test_get_overall_completion_state(array $rules, array $rulestates, int $invokecount, int $state): void {
104
        $stub = $this->setup_mock([
104
        $stub = $this->setup_mock([
105
            'get_available_custom_rules',
105
            'get_available_custom_rules',
106
            'get_state',
106
            'get_state',
107
        ]);
107
        ]);
Línea 153... Línea 153...
153
     * @dataProvider validate_rule_provider
153
     * @dataProvider validate_rule_provider
154
     * @param bool $defined is_defined()'s mocked return value.
154
     * @param bool $defined is_defined()'s mocked return value.
155
     * @param bool $available is_available()'s mocked return value.
155
     * @param bool $available is_available()'s mocked return value.
156
     * @param string|null $expectedexception Expected expectation class name.
156
     * @param string|null $expectedexception Expected expectation class name.
157
     */
157
     */
158
    public function test_validate_rule(bool $defined, bool $available, ?string $expectedexception) {
158
    public function test_validate_rule(bool $defined, bool $available, ?string $expectedexception): void {
159
        $stub = $this->setup_mock([
159
        $stub = $this->setup_mock([
160
            'is_defined',
160
            'is_defined',
161
            'is_available'
161
            'is_available'
162
        ]);
162
        ]);
Línea 178... Línea 178...
178
    }
178
    }
Línea 179... Línea 179...
179
 
179
 
180
    /**
180
    /**
181
     * Test for is_available().
181
     * Test for is_available().
182
     */
182
     */
183
    public function test_is_available() {
183
    public function test_is_available(): void {
184
        $stub = $this->setup_mock([
184
        $stub = $this->setup_mock([
185
            'get_available_custom_rules',
185
            'get_available_custom_rules',
Línea 186... Línea 186...
186
        ]);
186
        ]);