MediaWiki  REL1_19
ExternalStoreTest.php
Go to the documentation of this file.
00001 <?php
00006 class ExternalStoreTest extends MediaWikiTestCase {
00007         private $saved_wgExternalStores;
00008 
00009         function setUp() {
00010                 global $wgExternalStores;
00011                 $this->saved_wgExternalStores = $wgExternalStores ;
00012         }
00013 
00014         function tearDown() {
00015                 global $wgExternalStores;
00016                 $wgExternalStores = $this->saved_wgExternalStores ;
00017         }
00018 
00019         function testExternalStoreDoesNotFetchIncorrectURL() {
00020                 global $wgExternalStores;
00021                 $wgExternalStores = true;
00022 
00023                 # Assertions for r68900
00024                 $this->assertFalse(
00025                         ExternalStore::fetchFromURL( 'http://' ) );
00026                 $this->assertFalse(
00027                         ExternalStore::fetchFromURL( 'ftp.wikimedia.org' ) );
00028                 $this->assertFalse(
00029                         ExternalStore::fetchFromURL( '/super.txt' ) );
00030         }
00031 }
00032