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
 * @package    core_question
34
 * @package    core_question
35
 * @category   test
35
 * @category   test
36
 * @copyright  2012 The Open University
36
 * @copyright  2012 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 unitofwork_test extends \data_loading_method_test_base {
39
final class unitofwork_test extends \data_loading_method_test_base {
40
    /** @var question_usage_by_activity the test question usage. */
40
    /** @var question_usage_by_activity the test question usage. */
41
    protected $quba;
41
    protected $quba;
Línea 42... Línea 42...
42
 
42
 
43
    /** @var int the slot number of the one qa in the test usage.*/
43
    /** @var int the slot number of the one qa in the test usage.*/
Línea 44... Línea 44...
44
    protected $slot;
44
    protected $slot;
45
 
45
 
Línea 46... Línea 46...
46
    /** @var testable_question_engine_unit_of_work the unit of work we are testing. */
46
    /** @var testable_question_engine_unit_of_work the unit of work we are testing. */
-
 
47
    protected $observer;
47
    protected $observer;
48
 
48
 
49
    protected function setUp(): void {
49
    protected function setUp(): void {
50
        parent::setUp();
50
        // Create a usage in an initial state, with one shortanswer question added,
51
        // Create a usage in an initial state, with one shortanswer question added,
51
        // and attempted in interactive mode submitted responses 'toad' then 'frog'.
52
        // and attempted in interactive mode submitted responses 'toad' then 'frog'.
Línea 63... Línea 64...
63
        $this->setup_initial_test_state($this->get_test_data());
64
        $this->setup_initial_test_state($this->get_test_data());
64
     }
65
     }
Línea 65... Línea 66...
65
 
66
 
66
    public function tearDown(): void {
67
    public function tearDown(): void {
-
 
68
        question_bank::end_unit_test();
67
        question_bank::end_unit_test();
69
        parent::tearDown();
Línea 68... Línea 70...
68
    }
70
    }
69
 
71