4 * Tests for OracleInstaller
10 class OracleInstallerTest
extends MediaWikiTestCase
{
13 * @dataProvider provideOracleConnectStrings
15 function testCheckConnectStringFormat( $expected, $connectString, $msg = '' ) {
16 $validity = $expected ?
'should be valid' : 'should NOT be valid';
17 $msg = "'$connectString' ($msg) $validity.";
18 $this->assertEquals( $expected,
19 OracleInstaller
::checkConnectStringFormat( $connectString ),
25 * Provider to test OracleInstaller::checkConnectStringFormat()
27 function provideOracleConnectStrings() {
28 // expected result, connectString[, message]
30 array( true, 'simple_01', 'Simple TNS name' ),
31 array( true, 'simple_01.world', 'TNS name with domain' ),
32 array( true, 'simple_01.domain.net', 'TNS name with domain' ),
33 array( true, 'host123', 'Host only' ),
34 array( true, 'host123.domain.net', 'FQDN only' ),
35 array( true, '//host123.domain.net', 'FQDN URL only' ),
36 array( true, '123.223.213.132', 'Host IP only' ),
37 array( true, 'host:1521', 'Host and port' ),
38 array( true, 'host:1521/service', 'Host, port and service' ),
39 array( true, 'host:1521/service:shared', 'Host, port, service and shared server type' ),
40 array( true, 'host:1521/service:dedicated', 'Host, port, service and dedicated server type' ),
41 array( true, 'host:1521/service:pooled', 'Host, port, service and pooled server type' ),
42 array( true, 'host:1521/service:shared/instance1', 'Host, port, service, server type and instance' ),
43 array( true, 'host:1521//instance1', 'Host, port and instance' ),