* @ingroup Test
*
* @group Site
+ * @group Database
*
* @licence GNU GPL v2+
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
public function constructorTestProvider() {
$argLists = array();
- $argLists[] = array( 'global_key' => '42' );
+ $argLists[] = array( 'global_key' => 'foo' );
- $argLists[] = array( 'global_key' => '42', 'type' => Site::TYPE_MEDIAWIKI );
+ $argLists[] = array( 'global_key' => 'bar', 'type' => Site::TYPE_MEDIAWIKI );
$constructorArgs = array();
$this->assertEquals( $path, $site->getPath( 'foo' ) );
}
+ public function testProtocolRelativePath() {
+ /* @var SiteObject $site */
+ $site = $this->getRowInstance( $this->getMockFields(), false );
+
+ $type = $site->getLinkPathType();
+ $path = '//acme.com/'; // protocol-relative URL
+ $site->setPath( $type, $path );
+
+ $this->assertEquals( '', $site->getProtocol() );
+ }
+
public function provideGetPageUrl() {
//NOTE: the assumption that the URL is built by replacing $1
// with the urlencoded version of $page