class WikiReferenceTest extends PHPUnit_Framework_TestCase {
- public function provideGetHostname() {
- return array(
- 'http' => array( 'foo.bar', 'http://foo.bar' ),
- 'https' => array( 'foo.bar', 'https://foo.bar' ),
- );
- }
-
- /**
- * @dataProvider provideGetHostname
- */
- public function testGetHostname( $expected, $canonicalServer ) {
- $this->markTestSkipped( 'The implementation is patently broken.' );
-
- $reference = new WikiReference( 'wiki', 'xx', $canonicalServer, '/wiki/$1' );
- $this->assertEquals( $expected, $reference->getHostname() );
- }
-
public function provideGetDisplayName() {
return array(
'http' => array( 'foo.bar', 'http://foo.bar' ),
'https' => array( 'foo.bar', 'http://foo.bar' ),
// apparently, this is the expected behavior
- 'invalid' => array( 'purple kittens/wiki/', 'purple kittens' ),
+ 'invalid' => array( 'purple kittens', 'purple kittens' ),
);
}
/**
* @dataProvider provideGetCanonicalUrl
+ * @note getUrl is an alias for getCanonicalUrl
*/
public function testGetUrl( $expected, $canonicalServer, $server, $path, $page, $fragmentId ) {
$reference = new WikiReference( 'wiki', 'xx', $canonicalServer, $path, $server );