setExtensionData( 'pageImages', array( array( 'filename' => 'A.jpg', 'fullwidth' => 100, 'fullheight' => 50 ), ) ); $linksUpdate = $this->getMockBuilder( 'LinksUpdate' ) ->disableOriginalConstructor() ->getMock(); $linksUpdate->expects( $this->any() ) ->method( 'getParserOutput' ) ->will( $this->returnValue( $parserOutput ) ); $this->assertTrue( LinksUpdateHookHandler::onLinksUpdate( $linksUpdate ) ); $this->assertTrue( property_exists( $linksUpdate, 'mProperties' ), 'precondition' ); $this->assertSame( 'A.jpg', $linksUpdate->mProperties[PageImages::PROP_NAME] ); } }