Revert "merged master"
[lhc/web/wiklou.git] / tests / phpunit / includes / ExternalStoreTest.php
1 <?php
2 /**
3 * External Store tests
4 */
5
6 class ExternalStoreTest extends MediaWikiTestCase {
7 private $saved_wgExternalStores;
8
9 function setUp() {
10 global $wgExternalStores;
11 $this->saved_wgExternalStores = $wgExternalStores ;
12 }
13
14 function tearDown() {
15 global $wgExternalStores;
16 $wgExternalStores = $this->saved_wgExternalStores ;
17 }
18
19 function testExternalStoreDoesNotFetchIncorrectURL() {
20 global $wgExternalStores;
21 $wgExternalStores = true;
22
23 # Assertions for r68900
24 $this->assertFalse(
25 ExternalStore::fetchFromURL( 'http://' ) );
26 $this->assertFalse(
27 ExternalStore::fetchFromURL( 'ftp.wikimedia.org' ) );
28 $this->assertFalse(
29 ExternalStore::fetchFromURL( '/super.txt' ) );
30 }
31 }
32