Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 31... Línea 31...
31
 * @package    core_question
31
 * @package    core_question
32
 * @category   test
32
 * @category   test
33
 * @copyright  2009 The Open University
33
 * @copyright  2009 The Open University
34
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
34
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
35
 */
35
 */
36
class questionattemptstepiterator_test extends \advanced_testcase {
36
final class questionattemptstepiterator_test extends \advanced_testcase {
37
    private $qa;
37
    private $qa;
38
    private $iterator;
38
    private $iterator;
Línea 39... Línea 39...
39
 
39
 
-
 
40
    protected function setUp(): void {
40
    protected function setUp(): void {
41
        parent::setUp();
41
        $question = \test_question_maker::make_question('description');
42
        $question = \test_question_maker::make_question('description');
42
        $this->qa = new testable_question_attempt($question, 0);
43
        $this->qa = new testable_question_attempt($question, 0);
43
        for ($i = 0; $i < 3; $i++) {
44
        for ($i = 0; $i < 3; $i++) {
44
            $step = new question_attempt_step(array('i' => $i));
45
            $step = new question_attempt_step(array('i' => $i));
Línea 48... Línea 49...
48
    }
49
    }
Línea 49... Línea 50...
49
 
50
 
50
    protected function tearDown(): void {
51
    protected function tearDown(): void {
51
        $this->qa = null;
52
        $this->qa = null;
-
 
53
        $this->iterator = null;
52
        $this->iterator = null;
54
        parent::tearDown();
Línea 53... Línea 55...
53
    }
55
    }
54
 
56
 
55
    public function test_foreach_loop(): void {
57
    public function test_foreach_loop(): void {