Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 34... Línea 34...
34
 *
34
 *
35
 * @package   qformat_gift
35
 * @package   qformat_gift
36
 * @copyright 2010 The Open University
36
 * @copyright 2010 The Open University
37
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
37
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
38
 */
38
 */
39
class giftformat_test extends \question_testcase {
39
final class giftformat_test extends \question_testcase {
40
    public function assert_same_gift($expectedtext, $text) {
40
    public function assert_same_gift($expectedtext, $text) {
41
        $this->assertEquals(
41
        $this->assertEquals(
42
            phpunit_util::normalise_line_endings($expectedtext),
42
            phpunit_util::normalise_line_endings($expectedtext),
43
            phpunit_util::normalise_line_endings($text)
43
            phpunit_util::normalise_line_endings($text)
44
        );
44
        );
Línea 367... Línea 367...
367
     * Return a list of numbering styles (see question/type/multichoice/questiontype.php
367
     * Return a list of numbering styles (see question/type/multichoice/questiontype.php
368
     * for valid choices)
368
     * for valid choices)
369
     *
369
     *
370
     * @return array Array of 1-element arrays of qtype_multichoice numbering styles
370
     * @return array Array of 1-element arrays of qtype_multichoice numbering styles
371
     */
371
     */
372
    public function numberingstyle_provider() {
372
    public static function numberingstyle_provider(): array {
373
        return [
373
        return [
374
            ['abc'],
374
            ['abc'],
375
            ['ABCD'],
375
            ['ABCD'],
376
            ['123'],
376
            ['123'],
377
            ['iii'],
377
            ['iii'],
Línea 1331... Línea 1331...
1331
    /**
1331
    /**
1332
     * Data provider for test_extract_idnumber_and_tags_from_comment.
1332
     * Data provider for test_extract_idnumber_and_tags_from_comment.
1333
     *
1333
     *
1334
     * @return array the test cases.
1334
     * @return array the test cases.
1335
     */
1335
     */
1336
    public function extract_idnumber_and_tags_from_comment_testcases() {
1336
    public static function extract_idnumber_and_tags_from_comment_testcases(): array {
1337
        return [
1337
        return [
1338
            'blank comment' => ['', [], ''],
1338
            'blank comment' => ['', [], ''],
1339
            'nothing in comment' => ['', [], '// A basic comment.'],
1339
            'nothing in comment' => ['', [], '// A basic comment.'],
1340
            'idnumber only' => ['frog', [], '// A comment with [id:frog] <-- an idnumber.'],
1340
            'idnumber only' => ['frog', [], '// A comment with [id:frog] <-- an idnumber.'],
1341
            'tags only' => ['', ['frog', 'toad'], '// Look tags: [tag:frog] [tag:toad].'],
1341
            'tags only' => ['', ['frog', 'toad'], '// Look tags: [tag:frog] [tag:toad].'],