MediaWiki  REL1_22
OracleInstallerTest.php
Go to the documentation of this file.
00001 <?php
00002 
00010 class OracleInstallerTest extends MediaWikiTestCase {
00011 
00016     public function testCheckConnectStringFormat( $expected, $connectString, $msg = '' ) {
00017         $validity = $expected ? 'should be valid' : 'should NOT be valid';
00018         $msg = "'$connectString' ($msg) $validity.";
00019         $this->assertEquals( $expected,
00020             OracleInstaller::checkConnectStringFormat( $connectString ),
00021             $msg
00022         );
00023     }
00024 
00028     function provideOracleConnectStrings() {
00029         // expected result, connectString[, message]
00030         return array(
00031             array( true, 'simple_01', 'Simple TNS name' ),
00032             array( true, 'simple_01.world', 'TNS name with domain' ),
00033             array( true, 'simple_01.domain.net', 'TNS name with domain' ),
00034             array( true, 'host123', 'Host only' ),
00035             array( true, 'host123.domain.net', 'FQDN only' ),
00036             array( true, '//host123.domain.net', 'FQDN URL only' ),
00037             array( true, '123.223.213.132', 'Host IP only' ),
00038             array( true, 'host:1521', 'Host and port' ),
00039             array( true, 'host:1521/service', 'Host, port and service' ),
00040             array( true, 'host:1521/service:shared', 'Host, port, service and shared server type' ),
00041             array( true, 'host:1521/service:dedicated', 'Host, port, service and dedicated server type' ),
00042             array( true, 'host:1521/service:pooled', 'Host, port, service and pooled server type' ),
00043             array( true, 'host:1521/service:shared/instance1', 'Host, port, service, server type and instance' ),
00044             array( true, 'host:1521//instance1', 'Host, port and instance' ),
00045         );
00046     }
00047 
00048 }