* @file
*/
-/**
- * Test class for MWNamespace.
- * @todo FIXME: this test file is a mess
- */
class MWNamespaceTest extends MediaWikiTestCase {
+
protected function setUp() {
parent::setUp();
] );
}
-# ### START OF TESTS #########################################################
-
/**
* @todo Write more texts, handle $wgAllowImageMoving setting
* @covers MWNamespace::isMovable
*/
public function testIsMovable() {
$this->assertFalse( MWNamespace::isMovable( NS_SPECIAL ) );
- # @todo FIXME: Write more tests!!
}
/**
$this->assertNull( MWNamespace::getAssociated( NS_SPECIAL ) );
}
- /**
- * @todo Implement testExists().
- */
- /*
- public function testExists() {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
- );
- }
- */
-
/**
* Test MWNamespace::equals
* Note if we add a namespace registration system with keys like 'MAIN'
);
}
- /**
- * @todo Implement testGetCanonicalNamespaces().
- */
- /*
- public function testGetCanonicalNamespaces() {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
- );
- }
- */
- /**
- * @todo Implement testGetCanonicalName().
- */
- /*
- public function testGetCanonicalName() {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
- );
- }
- */
- /**
- * @todo Implement testGetCanonicalIndex().
- */
- /*
- public function testGetCanonicalIndex() {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
- );
- }
- */
-
- /**
- * @todo Implement testGetValidNamespaces().
- */
- /*
- public function testGetValidNamespaces() {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
- );
- }
- */
-
public function provideHasTalkNamespace() {
return [
[ NS_MEDIA, false ],
$this->assertNull( $text );
}
- /*
- public static function makeContent( $text, Title $title, $modelId = null, $format = null ) {}
- */
-
public static function dataMakeContent() {
return [
[ 'hallo', 'Help:Test', null, null, CONTENT_MODEL_WIKITEXT, 'hallo', false ],
$this->assertSame( $tag, 'mw-contentmodelchange' );
}
- /*
- public function testSupportsSections() {
- $this->markTestIncomplete( "not yet implemented" );
- }
- */
-
/**
* @covers ContentHandler::supportsCategories
*/
$this->assertSame( $expected, $tag );
}
- /**
- * @todo Text case requires database, should be done by a test class in the Database group
- */
- /*
- public function testGetAutoDeleteReason( Title $title, &$hasHistory ) {}
- */
-
- /**
- * @todo Text case requires database, should be done by a test class in the Database group
- */
- /*
- public function testGetUndoContent( Revision $current, Revision $undo,
- Revision $undoafter = null
- ) {
- }
- */
-
/**
* @covers WikitextContentHandler::getDataForSearchIndex
*/
$this->assertEquals( $expected, $meta['Copyright']['x-default'] );
}
- /**
- * Test extraction of pHYs tags, which can tell what the
- * actual resolution of the image is (aka in dots per meter).
- */
- /*
- public function testPngPhysTag() {
- $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
- 'Png-native-test.png' );
-
- $this->assertArrayHasKey( 'text', $meta );
- $meta = $meta['text'];
-
- $this->assertEquals( '2835/100', $meta['XResolution'] );
- $this->assertEquals( '2835/100', $meta['YResolution'] );
- $this->assertEquals( 3, $meta['ResolutionUnit'] ); // 3 = cm
- }
- */
-
/**
* Given a normal static PNG, check the animation metadata returned.
*/