Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 27... Línea 27...
27
 *
27
 *
28
 * @package    repository_googledocs
28
 * @package    repository_googledocs
29
 * @copyright  2021 Mihail Geshoski <mihail@moodle.com>
29
 * @copyright  2021 Mihail Geshoski <mihail@moodle.com>
30
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
30
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
31
 */
31
 */
32
class helper_test extends \repository_googledocs_testcase {
32
final class helper_test extends \repository_googledocs_testcase {
Línea 33... Línea 33...
33
 
33
 
34
    /**
34
    /**
35
     * Test build_node_path().
35
     * Test build_node_path().
36
     *
36
     *
Línea 48... Línea 48...
48
    /**
48
    /**
49
     * Data provider for test_build_node_path().
49
     * Data provider for test_build_node_path().
50
     *
50
     *
51
     * @return array
51
     * @return array
52
     */
52
     */
53
    public function build_node_path_provider(): array {
53
    public static function build_node_path_provider(): array {
Línea 54... Línea 54...
54
 
54
 
55
        $rootid = \repository_googledocs::REPOSITORY_ROOT_ID;
55
        $rootid = \repository_googledocs::REPOSITORY_ROOT_ID;
56
        $mydriveid = \repository_googledocs::MY_DRIVE_ROOT_ID;
56
        $mydriveid = \repository_googledocs::MY_DRIVE_ROOT_ID;
Línea 103... Línea 103...
103
    /**
103
    /**
104
     * Data provider for test_explode_node_path().
104
     * Data provider for test_explode_node_path().
105
     *
105
     *
106
     * @return array
106
     * @return array
107
     */
107
     */
108
    public function explode_node_path_provider(): array {
108
    public static function explode_node_path_provider(): array {
Línea 109... Línea 109...
109
 
109
 
Línea 110... Línea 110...
110
        $rootid = \repository_googledocs::REPOSITORY_ROOT_ID;
110
        $rootid = \repository_googledocs::REPOSITORY_ROOT_ID;
111
 
111
 
Línea 153... Línea 153...
153
    /**
153
    /**
154
     * Data provider for test_get_browser().
154
     * Data provider for test_get_browser().
155
     *
155
     *
156
     * @return array
156
     * @return array
157
     */
157
     */
158
    public function get_browser_provider(): array {
158
    public static function get_browser_provider(): array {
Línea 159... Línea 159...
159
 
159
 
160
        $rootid = \repository_googledocs::REPOSITORY_ROOT_ID;
160
        $rootid = \repository_googledocs::REPOSITORY_ROOT_ID;
161
        $mydriveid = \repository_googledocs::MY_DRIVE_ROOT_ID;
161
        $mydriveid = \repository_googledocs::MY_DRIVE_ROOT_ID;
Línea 206... Línea 206...
206
    /**
206
    /**
207
     * Data provider for test_get_node().
207
     * Data provider for test_get_node().
208
     *
208
     *
209
     * @return array
209
     * @return array
210
     */
210
     */
211
    public function get_node_provider(): array {
211
    public static function get_node_provider(): array {
212
 
-
 
213
        return [
212
        return [
214
            'The content object represents a Google Drive folder.' =>
213
            'The content object represents a Google Drive folder.' =>
215
                [
214
                [
216
                    $this->create_google_drive_folder_object('e3b0c44298fc1c149', 'Folder', ''),
215
                    self::create_google_drive_folder_object('e3b0c44298fc1c149', 'Folder', ''),
217
                    \repository_googledocs\local\node\folder_node::class,
216
                    \repository_googledocs\local\node\folder_node::class,
218
                ],
217
                ],
219
            'The content object represents a Google Drive file.' =>
218
            'The content object represents a Google Drive file.' =>
220
                [
219
                [
221
                    $this->create_google_drive_file_object('de04d58dc5ccc', 'File.pdf',
220
                    self::create_google_drive_file_object('de04d58dc5ccc', 'File.pdf',
222
                        'application/pdf'),
221
                        'application/pdf'),
223
                    \repository_googledocs\local\node\file_node::class,
222
                    \repository_googledocs\local\node\file_node::class,
224
                ],
223
                ],
225
        ];
224
        ];
226
    }
225
    }
Línea 251... Línea 250...
251
    /**
250
    /**
252
     * Data provider for test_request_exception().
251
     * Data provider for test_request_exception().
253
     *
252
     *
254
     * @return array
253
     * @return array
255
     */
254
     */
256
    public function request_exception_provider(): array {
255
    public static function request_exception_provider(): array {
Línea 257... Línea 256...
257
 
256
 
258
        return [
257
        return [
259
            'The API call throws exception (status: 403; message: Access Not Configured).' =>
258
            'The API call throws exception (status: 403; message: Access Not Configured).' =>
260
                [
259
                [