wiki.techinc.nl/tests/phpunit/includes/ExternalStoreTest.php
Chad Horohoe 447529064b * verbose and color default output from phpunit
* Make a bunch of tests subclass MediaWikiTestCase
* Parser tests and ResourceLoaderTest can't subclass it yet due to various issues
2010-12-28 18:17:16 +00:00

32 lines
706 B
PHP

<?php
/**
* External Store tests
*/
class ExternalStoreTest extends MediaWikiTestCase {
private $saved_wgExternalStores;
function setUp() {
global $wgExternalStores;
$this->saved_wgExternalStores = $wgExternalStores ;
}
function tearDown() {
global $wgExternalStores;
$wgExternalStores = $this->saved_wgExternalStores ;
}
function testExternalStoreDoesNotFetchIncorrectURL() {
global $wgExternalStores;
$wgExternalStores = true;
# Assertions for r68900
$this->assertFalse(
ExternalStore::fetchFromURL( 'http://' ) );
$this->assertFalse(
ExternalStore::fetchFromURL( 'ftp.wikimedia.org' ) );
$this->assertFalse(
ExternalStore::fetchFromURL( '/super.txt' ) );
}
}