+ 'Self move' => [
+ 'Existent',
+ 'Existent',
+ // @todo There's no reason to return 'articleexists' here
+ [ [ 'selfmove' ], [ 'articleexists' ] ],
+ ],
+ 'Move to null' => [
+ 'Existent',
+ null,
+ [ [ 'badtitletext' ] ],
+ ],
+ 'Move from empty name' => [
+ Title::makeTitle( NS_MAIN, '' ),
+ 'Nonexistent',
+ // @todo More specific error message
+ [ [ 'badarticleerror' ] ],
+ ],
+ 'Move to empty name' => [
+ 'Existent',
+ Title::makeTitle( NS_MAIN, '' ),
+ // @todo article-exists is just not correct, and badarticleerror is too general
+ [ [ 'articleexists' ], [ 'badarticleerror' ] ],
+ ],
+ 'Move to invalid name' => [
+ 'Existent',
+ Title::makeTitle( NS_MAIN, '<' ),
+ // @todo This is wrong
+ [],
+ ],
+ 'Move between invalid names' => [
+ Title::makeTitle( NS_MAIN, '<' ),
+ Title::makeTitle( NS_MAIN, '>' ),
+ // @todo More specific error message
+ [ [ 'badarticleerror' ] ],
+ ],
+ 'Move nonexistent' => [
+ 'Nonexistent',
+ 'Nonexistent2',
+ // @todo More specific error message
+ [ [ 'badarticleerror' ] ],
+ ],
+ 'Move over existing' => [
+ 'Existent',
+ 'Existent2',
+ [ [ 'articleexists' ] ],
+ ],
+ 'Move from another wiki' => [
+ Title::makeTitle( NS_MAIN, 'Test', '', 'otherwiki' ),
+ 'Nonexistent',
+ // @todo First error is wrong, second is too vague
+ [ [ 'immobile-source-namespace', '' ], [ 'badarticleerror' ] ],
+ ],
+ 'Move special page' => [
+ 'Special:FooBar',
+ 'Nonexistent',
+ // @todo Second error not needed
+ [ [ 'immobile-source-namespace', 'Special' ], [ 'badarticleerror' ] ],
+ ],
+ 'Move to another wiki' => [
+ 'Existent',
+ Title::makeTitle( NS_MAIN, 'Test', '', 'otherwiki' ),
+ // @todo Second error wrong
+ [ [ 'immobile-target-namespace-iw' ], [ 'immobile-target-namespace', '' ] ],
+ ],
+ 'Move to special page' =>
+ [ 'Existent', 'Special:FooBar', [ [ 'immobile-target-namespace', 'Special' ] ] ],
+ 'Move to allowed content model' => [
+ 'MediaWiki:Existent.js',
+ 'MediaWiki:Nonexistent',
+ [],
+ ],
+ 'Move to prohibited content model' => [
+ 'Existent',
+ 'No content allowed',
+ [ [ 'content-not-allowed-here', 'wikitext', 'No content allowed', 'main' ] ],
+ ],
+ 'Aborted by hook' => [
+ 'Hooked in place',
+ 'Nonexistent',
+ // @todo Error is wrong
+ [ [ 'immobile-source-namespace', '' ] ],
+ ],
+ 'Doubly aborted by hook' => [
+ 'Hooked in place',
+ 'Hooked In Place',
+ // @todo Both errors are wrong
+ [ [ 'immobile-source-namespace', '' ], [ 'immobile-target-namespace', '' ] ],
+ ],
+ 'Non-file to file' =>
+ [ 'Existent', 'File:Nonexistent.jpg', [ [ 'nonfile-cannot-move-to-file' ] ] ],
+ 'File to non-file' => [
+ 'File:Existent.jpg',
+ 'Nonexistent',
+ // @todo First error not needed
+ [ [ 'imagetypemismatch' ], [ 'imagenocrossnamespace' ] ],
+ ],
+ 'Existing file to non-existing file' => [
+ 'File:Existent.jpg',
+ 'File:Nonexistent.jpg',
+ [],
+ ],
+ 'Existing file to existing file' => [
+ 'File:Existent.jpg',
+ 'File:Existent2.jpg',
+ [ [ 'articleexists' ] ],
+ ],
+ 'Existing file to existing file with no page' => [
+ 'File:Existent.jpg',
+ 'File:Existent-file-no-page.jpg',
+ // @todo Is this correct? Moving over an existing file with no page should succeed?
+ [],
+ ],
+ 'Existing file to name with slash' => [
+ 'File:Existent.jpg',
+ 'File:Existent/slashed.jpg',
+ [ [ 'imageinvalidfilename' ] ],
+ ],
+ 'Mismatched file extension' => [
+ 'File:Existent.jpg',
+ 'File:Nonexistent.png',
+ [ [ 'imagetypemismatch' ] ],
+ ],