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
 *
29
 *
30
 * @package    gradeimport_csv
30
 * @package    gradeimport_csv
31
 * @copyright  2014 Adrian Greeve
31
 * @copyright  2014 Adrian Greeve
32
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
32
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
33
 */
33
 */
34
class load_data_test extends \grade_base_testcase {
34
final class load_data_test extends \grade_base_testcase {
Línea 35... Línea 35...
35
 
35
 
36
    /** @var string $oktext Text to be imported. This data should have no issues being imported. */
36
    /** @var string $oktext Text to be imported. This data should have no issues being imported. */
37
    protected $oktext = '"First name","Last name","ID number",Institution,Department,"Email address","Assignment: Assignment for grape group", "Feedback: Assignment for grape group","Assignment: Second new grade item","Course total"
37
    protected $oktext = '"First name","Last name","ID number",Institution,Department,"Email address","Assignment: Assignment for grape group", "Feedback: Assignment for grape group","Assignment: Second new grade item","Course total"
38
Anne,Able,,"Moodle HQ","Rock on!",student7@example.com,56.00,"We welcome feedback",,56.00
38
Anne,Able,,"Moodle HQ","Rock on!",student7@example.com,56.00,"We welcome feedback",,56.00
Línea 57... Línea 57...
57
    /** @var array $columns The first row of the csv file. These are the columns of the import file.*/
57
    /** @var array $columns The first row of the csv file. These are the columns of the import file.*/
58
    protected $columns;
58
    protected $columns;
Línea 59... Línea 59...
59
 
59
 
60
    public function tearDown(): void {
60
    public function tearDown(): void {
-
 
61
        $this->csvimport = null;
61
        $this->csvimport = null;
62
        parent::tearDown();
Línea 62... Línea 63...
62
    }
63
    }
63
 
64
 
64
    /**
65
    /**
Línea 239... Línea 240...
239
    /**
240
    /**
240
     * Data provider for \gradeimport_csv_load_data_testcase::test_check_user_exists().
241
     * Data provider for \gradeimport_csv_load_data_testcase::test_check_user_exists().
241
     *
242
     *
242
     * @return array
243
     * @return array
243
     */
244
     */
244
    public function check_user_exists_provider() {
245
    public static function check_user_exists_provider(): array {
245
        return [
246
        return [
246
            'Fetch by email' => [
247
            'Fetch by email' => [
247
                'email', 's1@example.com', true
248
                'email', 's1@example.com', true
248
            ],
249
            ],
249
            'Fetch by email, different case' => [
250
            'Fetch by email, different case' => [