Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 52... Línea 52...
52
     * @dataProvider proxy_testcases
52
     * @dataProvider proxy_testcases
53
     * @param int    $id       Object ID.
53
     * @param int    $id       Object ID.
54
     * @param string $member   Object member to retrieve.
54
     * @param string $member   Object member to retrieve.
55
     * @param mixed  $expected Expected value of member.
55
     * @param mixed  $expected Expected value of member.
56
     */
56
     */
57
    public function test_proxy($id, $member, $expected) {
57
    public function test_proxy($id, $member, $expected): void {
58
        $proxy = new std_proxy($id, function($id) {
58
        $proxy = new std_proxy($id, function($id) {
59
            return $this->objects[$id];
59
            return $this->objects[$id];
60
        });
60
        });
Línea 61... Línea 61...
61
 
61
 
Línea 68... Línea 68...
68
     * @dataProvider proxy_testcases
68
     * @dataProvider proxy_testcases
69
     * @param int    $id          Object ID.
69
     * @param int    $id          Object ID.
70
     * @param string $member      Object member to retrieve.
70
     * @param string $member      Object member to retrieve.
71
     * @param mixed  $storedvalue Value as would be stored externally.
71
     * @param mixed  $storedvalue Value as would be stored externally.
72
     */
72
     */
73
    public function test_base_values($id, $member, $storedvalue) {
73
    public function test_base_values($id, $member, $storedvalue): void {
74
        $proxy = new std_proxy(
74
        $proxy = new std_proxy(
75
            $id,
75
            $id,
76
            function($id) {
76
            function($id) {
77
                return $this->objects[$id];
77
                return $this->objects[$id];
78
            },
78
            },
Línea 87... Línea 87...
87
     * Test getting a non existant member.
87
     * Test getting a non existant member.
88
     *
88
     *
89
     * @dataProvider get_set_testcases
89
     * @dataProvider get_set_testcases
90
     * @param int $id ID of the object being proxied.
90
     * @param int $id ID of the object being proxied.
91
     */
91
     */
92
    public function test_get_invalid_member($id) {
92
    public function test_get_invalid_member($id): void {
93
        $proxy = new std_proxy($id, function($id) {
93
        $proxy = new std_proxy($id, function($id) {
94
            return $this->objects[$id];
94
            return $this->objects[$id];
95
        });
95
        });
Línea 96... Línea 96...
96
 
96
 
Línea 102... Línea 102...
102
     * Test get proxied instance.
102
     * Test get proxied instance.
103
     *
103
     *
104
     * @dataProvider get_set_testcases
104
     * @dataProvider get_set_testcases
105
     * @param int $id Object ID.
105
     * @param int $id Object ID.
106
     */
106
     */
107
    public function test_get_proxied_instance($id) {
107
    public function test_get_proxied_instance($id): void {
108
        $proxy = new std_proxy($id, function($id) {
108
        $proxy = new std_proxy($id, function($id) {
109
            return $this->objects[$id];
109
            return $this->objects[$id];
110
        });
110
        });
Línea 111... Línea 111...
111
 
111