It is assumed that users of EditFilterMergedContent hook need to get
the page being edited from context as it happens during normal functioning,
tests shouldn't violate this convention.
Bug: 66930
Change-Id: I8d453d819aad8630d4934a15e7bf512fa828fe24
$ns = $this->getDefaultWikitextNS();
$title = Title::newFromText( $title, $ns );
}
$ns = $this->getDefaultWikitextNS();
$title = Title::newFromText( $title, $ns );
}
+ $this->assertNotNull( $title );
if ( is_string( $user ) ) {
$user = User::newFromName( $user );
if ( is_string( $user ) ) {
$user = User::newFromName( $user );
$req = new FauxRequest( $edit, true ); // session ??
$req = new FauxRequest( $edit, true ); // session ??
- $ep = new EditPage( new Article( $title ) );
+ $article = new Article( $title );
+ $article->getContext()->setTitle( $title );
+ $ep = new EditPage( $article );
$ep->setContextTitle( $title );
$ep->importFormData( $req );
$ep->setContextTitle( $title );
$ep->importFormData( $req );