Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 43... Línea 43...
43
 
43
 
44
    protected function setUp(): void {
44
    protected function setUp(): void {
45
        \moodle_simplepie::reset_cache();
45
        \moodle_simplepie::reset_cache();
Línea 46... Línea 46...
46
    }
46
    }
47
 
47
 
Línea 48... Línea 48...
48
    public function test_getfeed() {
48
    public function test_getfeed(): void {
Línea 49... Línea 49...
49
        $feed = new \moodle_simplepie($this->getExternalTestFileUrl('/rsstest.xml'), self::TIMEOUT);
49
        $feed = new \moodle_simplepie($this->getExternalTestFileUrl('/rsstest.xml'), self::TIMEOUT);
Línea 97... Línea 97...
97
    }
97
    }
Línea 98... Línea 98...
98
 
98
 
99
    /*
99
    /*
100
     * Test retrieving a url which doesn't exist.
100
     * Test retrieving a url which doesn't exist.
101
     */
101
     */
102
    public function test_failurl() {
102
    public function test_failurl(): void {
Línea 103... Línea 103...
103
        global $CFG;
103
        global $CFG;
104
 
104
 
105
        // We do not want this in php error log.
105
        // We do not want this in php error log.
Línea 111... Línea 111...
111
    }
111
    }
Línea 112... Línea 112...
112
 
112
 
113
    /*
113
    /*
114
     * Test retrieving a url with broken proxy configuration.
114
     * Test retrieving a url with broken proxy configuration.
115
     */
115
     */
116
    public function test_failproxy() {
116
    public function test_failproxy(): void {
Línea 117... Línea 117...
117
        global $CFG;
117
        global $CFG;
118
 
118
 
Línea 131... Línea 131...
131
    }
131
    }
Línea 132... Línea 132...
132
 
132
 
133
    /*
133
    /*
134
     * Test retrieving a url which sends a redirect to another valid feed.
134
     * Test retrieving a url which sends a redirect to another valid feed.
135
     */
135
     */
136
    public function test_redirect() {
136
    public function test_redirect(): void {
Línea 137... Línea 137...
137
        $feed = new \moodle_simplepie($this->getExternalTestFileUrl('/rss_redir.php'), self::TIMEOUT);
137
        $feed = new \moodle_simplepie($this->getExternalTestFileUrl('/rss_redir.php'), self::TIMEOUT);
138
 
138
 
139
        $this->assertNull($feed->error());
139
        $this->assertNull($feed->error());
Línea 144... Línea 144...
144
    /**
144
    /**
145
     * Test that we can get the right user ID based on the provided private key (token).
145
     * Test that we can get the right user ID based on the provided private key (token).
146
     *
146
     *
147
     * @covers ::rss_get_userid_from_token
147
     * @covers ::rss_get_userid_from_token
148
     */
148
     */
149
    public function test_rss_get_userid_from_token() {
149
    public function test_rss_get_userid_from_token(): void {
150
        global $USER;
150
        global $USER;
Línea 151... Línea 151...
151
 
151
 
152
        $this->resetAfterTest();
152
        $this->resetAfterTest();