MediaWikiIntegrationTestCase::getExistingTestPage: Throw if the requested page isn't wikitext
Change-Id: I8910d870a8ef226f22a3d5cbd6deb01405fdd80b
This commit is contained in:
parent
f33a0cdda2
commit
31b5732860
1 changed files with 3 additions and 0 deletions
|
|
@ -333,6 +333,9 @@ abstract class MediaWikiIntegrationTestCase extends PHPUnit\Framework\TestCase {
|
|||
$title = Title::newFromText( $title );
|
||||
}
|
||||
}
|
||||
if ( $title->getContentModel() !== CONTENT_MODEL_WIKITEXT ) {
|
||||
throw new LogicException( "Requested page {$title->getPrefixedText()} isn't in the wikitext content model." );
|
||||
}
|
||||
$page = $this->getServiceContainer()->getWikiPageFactory()->newFromTitle( $title );
|
||||
|
||||
if ( !$page->exists() ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue