3 class ExternalStoreTest
extends MediaWikiTestCase
{
6 * @covers ExternalStore::fetchFromURL
8 public function testExternalFetchFromURL_noExternalStores() {
10 'ExternalStoreFactory',
11 new ExternalStoreFactory( [] )
15 ExternalStore
::fetchFromURL( 'ForTesting://cluster1/200' ),
16 'Deny if wgExternalStores is not set to a non-empty array'
21 * @covers ExternalStore::fetchFromURL
23 public function testExternalFetchFromURL_someExternalStore() {
25 'ExternalStoreFactory',
26 new ExternalStoreFactory( [ 'ForTesting' ] )
31 ExternalStore
::fetchFromURL( 'ForTesting://cluster1/200' ),
32 'Allow FOO://cluster1/200'
36 ExternalStore
::fetchFromURL( 'ForTesting://cluster1/300/0' ),
37 'Allow FOO://cluster1/300/0'
39 # Assertions for r68900
41 ExternalStore
::fetchFromURL( 'ftp.example.org' ),
42 'Deny domain ftp.example.org'
45 ExternalStore
::fetchFromURL( '/example.txt' ),
46 'Deny path /example.txt'
49 ExternalStore
::fetchFromURL( 'http://' ),
50 'Deny protocol http://'