Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 29... Línea 29...
29
 * @copyright  2020 Amaia Anabitarte <amaia@moodle.com>
29
 * @copyright  2020 Amaia Anabitarte <amaia@moodle.com>
30
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
30
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
31
 * @coversDefaultClass \core_contentbank\contenttype
31
 * @coversDefaultClass \core_contentbank\contenttype
32
 *
32
 *
33
 */
33
 */
34
class contenttype_test extends \advanced_testcase {
34
final class contenttype_test extends \advanced_testcase {
Línea 35... Línea 35...
35
 
35
 
36
    /** @var int Identifier for the manager role. */
36
    /** @var int Identifier for the manager role. */
Línea 37... Línea 37...
37
    protected $managerroleid;
37
    protected $managerroleid;
Línea 238... Línea 238...
238
    /**
238
    /**
239
     * Data provider for test_rename_content.
239
     * Data provider for test_rename_content.
240
     *
240
     *
241
     * @return  array
241
     * @return  array
242
     */
242
     */
243
    public function upload_content_provider() {
243
    public static function upload_content_provider(): array {
244
        return [
244
        return [
245
            'With record' => [true],
245
            'With record' => [true],
246
            'Without record' => [false],
246
            'Without record' => [false],
247
        ];
247
        ];
248
    }
248
    }
Línea 447... Línea 447...
447
    /**
447
    /**
448
     * Data provider for test_rename_content.
448
     * Data provider for test_rename_content.
449
     *
449
     *
450
     * @return  array
450
     * @return  array
451
     */
451
     */
452
    public function rename_content_provider() {
452
    public static function rename_content_provider(): array {
453
        return [
453
        return [
454
            'Standard name' => ['New name', 'New name', true],
454
            'Standard name' => ['New name', 'New name', true],
455
            'Name with digits' => ['Today is 17/04/2017', 'Today is 17/04/2017', true],
455
            'Name with digits' => ['Today is 17/04/2017', 'Today is 17/04/2017', true],
456
            'Name with symbols' => ['Follow us: @moodle', 'Follow us: @moodle', true],
456
            'Name with symbols' => ['Follow us: @moodle', 'Follow us: @moodle', true],
457
            'Name with tags' => ['This is <b>bold</b>', 'This is bold', true],
457
            'Name with tags' => ['This is <b>bold</b>', 'This is bold', true],
Línea 655... Línea 655...
655
    }
655
    }
Línea 656... Línea 656...
656
 
656
 
657
    /**
657
    /**
658
     * Tests pluginfile result.
658
     * Tests pluginfile result.
659
     *
659
     *
660
     * @covers ::pluginfile
660
     * @covers ::__construct
661
     */
661
     */
662
    public function test_pluginfile(): void {
662
    public function test_pluginfile(): void {
663
        $this->resetAfterTest();
663
        $this->resetAfterTest();
664
        $this->setAdminUser();
664
        $this->setAdminUser();