Change-Id: I68dc34aa7d4c27ea7d0fb9488324d0f899564960
} elseif ( $isCurrent ) {
#XXX: why use RAW audience here, and PUBLIC (default) below?
$content = $this->page->getContent( Revision::RAW );
+ if ( $content === null ) {
+ return false;
+ }
+
} else {
$rev = Revision::newFromTitle( $this->page->getTitle(), $this->revid );
if ( $rev === null ) {
return $po;
}
+ /**
+ * @dataProvider provideGetParserOutput
+ */
+ public function testGetParserOutput_nonexisting( ) {
+ static $count = 0;
+ $count ++;
+
+ $page = new WikiPage( new Title( "testGetParserOutput_nonexisting_$count" ) );
+
+ $opt = new ParserOptions();
+ $po = $page->getParserOutput( $opt );
+
+ $this->assertFalse( $po, "getParserOutput() shall return false for non-existing pages." );
+ }
+
static $sections =
"Intro