Merge "MediaWikiIntegrationTestCase: Fail test when insert() fails"
This commit is contained in:
commit
fc89c57625
1 changed files with 4 additions and 1 deletions
|
|
@ -1579,7 +1579,10 @@ abstract class MediaWikiIntegrationTestCase extends PHPUnit\Framework\TestCase {
|
|||
$comment = __METHOD__ . ': Sample page for unit test.';
|
||||
|
||||
$page = $this->getServiceContainer()->getWikiPageFactory()->newFromTitle( $title );
|
||||
$page->doUserEditContent( ContentHandler::makeContent( $text, $title ), $user, $comment );
|
||||
$status = $page->doUserEditContent( ContentHandler::makeContent( $text, $title ), $user, $comment );
|
||||
if ( !$status->isOK() ) {
|
||||
$this->fail( $status->getWikiText() );
|
||||
}
|
||||
|
||||
return [
|
||||
'title' => $title,
|
||||
|
|
|
|||
Loading…
Reference in a new issue