Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 48... Línea 48...
48
class repeat_event_collection_test extends \advanced_testcase {
48
class repeat_event_collection_test extends \advanced_testcase {
49
    /**
49
    /**
50
     * Test that the collection id is set to the parent id if the repeat id
50
     * Test that the collection id is set to the parent id if the repeat id
51
     * is falsey.
51
     * is falsey.
52
     */
52
     */
53
    public function test_parent_id_no_repeat_id() {
53
    public function test_parent_id_no_repeat_id(): void {
54
        $this->resetAfterTest(true);
54
        $this->resetAfterTest(true);
55
        $dbrow = (object) [
55
        $dbrow = (object) [
56
            'id' => 123122131,
56
            'id' => 123122131,
57
            'repeatid' => null
57
            'repeatid' => null
58
        ];
58
        ];
Línea 64... Línea 64...
64
 
64
 
65
    /**
65
    /**
66
     * Test that the repeat id is set to the parent id if the repeat id
66
     * Test that the repeat id is set to the parent id if the repeat id
67
     * is not falsey (even if the parent id is provided).
67
     * is not falsey (even if the parent id is provided).
68
     */
68
     */
69
    public function test_parent_id_and_repeat_id() {
69
    public function test_parent_id_and_repeat_id(): void {
70
        $this->resetAfterTest(true);
70
        $this->resetAfterTest(true);
71
        $dbrow = (object) [
71
        $dbrow = (object) [
72
            'id' => 123122131,
72
            'id' => 123122131,
73
            'repeatid' => 5647839
73
            'repeatid' => 5647839
Línea 79... Línea 79...
79
    }
79
    }
Línea 80... Línea 80...
80
 
80
 
81
    /**
81
    /**
82
     * Test that an empty collection is valid.
82
     * Test that an empty collection is valid.
83
     */
83
     */
84
    public function test_empty_collection() {
84
    public function test_empty_collection(): void {
85
        $this->resetAfterTest(true);
85
        $this->resetAfterTest(true);
Línea 86... Línea 86...
86
        $this->setAdminUser();
86
        $this->setAdminUser();
87
 
87
 
Línea 106... Línea 106...
106
    }
106
    }
Línea 107... Línea 107...
107
 
107
 
108
    /**
108
    /**
109
     * Test that a collection with values behaves correctly.
109
     * Test that a collection with values behaves correctly.
110
     */
110
     */
111
    public function test_values_collection() {
111
    public function test_values_collection(): void {
112
        $this->resetAfterTest(true);
112
        $this->resetAfterTest(true);
Línea 113... Línea 113...
113
        $this->setAdminUser();
113
        $this->setAdminUser();
114
 
114