Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 82... Línea 82...
82
     * @Given /^the following "(?P<element_string>(?:[^"]|\\")*)" exist:$/
82
     * @Given /^the following "(?P<element_string>(?:[^"]|\\")*)" exist:$/
83
     *
83
     *
84
     * @param string    $entitytype The name of the type entity to add
84
     * @param string    $entitytype The name of the type entity to add
85
     * @param TableNode $data
85
     * @param TableNode $data
86
     */
86
     */
-
 
87
    #[\core\attribute\example('And the following "activities" exist:
-
 
88
        | activity | name              | intro           | course   | idnumber | section | visible |
-
 
89
        | assign   | Activity sample 1 | Test assignment | C1       | sample1  | 1       | 1       |
-
 
90
        | assign   | Activity sample 2 | Test assignment | C1       | sample2  | 1       | 0       |')]
87
    public function the_following_entities_exist($entitytype, TableNode $data) {
91
    public function the_following_entities_exist($entitytype, TableNode $data) {
88
        if (isset($this->movedentitytypes[$entitytype])) {
92
        if (isset($this->movedentitytypes[$entitytype])) {
89
            $entitytype = $this->movedentitytypes[$entitytype];
93
            $entitytype = $this->movedentitytypes[$entitytype];
90
        }
94
        }
91
        list($component, $entity) = $this->parse_entity_type($entitytype);
95
        list($component, $entity) = $this->parse_entity_type($entitytype);
Línea 99... Línea 103...
99
     *
103
     *
100
     * @param   string $entitytype The name of the type entity to add
104
     * @param   string $entitytype The name of the type entity to add
101
     * @param   int $count
105
     * @param   int $count
102
     * @param   TableNode $data
106
     * @param   TableNode $data
103
     */
107
     */
-
 
108
    #[\core\attribute\example('And "5" "course enrolments" exist with the following data:
-
 
109
        | user   | student[count] |
-
 
110
        | course | C1             |
-
 
111
        | role   | student        |')]
104
    public function the_following_repeated_entities_exist(string $entitytype, int $count, TableNode $data): void {
112
    public function the_following_repeated_entities_exist(string $entitytype, int $count, TableNode $data): void {
105
        $rows = $data->getRowsHash();
113
        $rows = $data->getRowsHash();
Línea 106... Línea 114...
106
 
114
 
107
        $tabledata = [array_keys($rows)];
115
        $tabledata = [array_keys($rows)];
Línea 128... Línea 136...
128
     * @Given the following :entitytype exists:
136
     * @Given the following :entitytype exists:
129
     *
137
     *
130
     * @param string    $entitytype The name of the type entity to add
138
     * @param string    $entitytype The name of the type entity to add
131
     * @param TableNode $data
139
     * @param TableNode $data
132
     */
140
     */
-
 
141
    #[\core\attribute\example('And the following "course" exists:
-
 
142
        | fullname         | Course test |
-
 
143
        | shortname        | C1          |
-
 
144
        | category         | 0           |
-
 
145
        | numsections      | 3           |
-
 
146
        | initsections     | 1           |')]
133
    public function the_following_entity_exists($entitytype, TableNode $data) {
147
    public function the_following_entity_exists($entitytype, TableNode $data) {
134
        if (isset($this->movedentitytypes[$entitytype])) {
148
        if (isset($this->movedentitytypes[$entitytype])) {
135
            $entitytype = $this->movedentitytypes[$entitytype];
149
            $entitytype = $this->movedentitytypes[$entitytype];
136
        }
150
        }
137
        list($component, $entity) = $this->parse_entity_type($entitytype);
151
        list($component, $entity) = $this->parse_entity_type($entitytype);