Mwjames has uploaded a new change for review.
https://gerrit.wikimedia.org/r/77503
Change subject: \SMW\Test\MockObjectBuilder extension
......................................................................
\SMW\Test\MockObjectBuilder extension
Change-Id: Ib9c60bb7385e4257fdba592cf0c8d82fb8dc9b4a
---
M tests/phpunit/MockObjectBuilder.php
1 file changed, 24 insertions(+), 0 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki
refs/changes/03/77503/1
diff --git a/tests/phpunit/MockObjectBuilder.php
b/tests/phpunit/MockObjectBuilder.php
index 8121292..37a9f2d 100644
--- a/tests/phpunit/MockObjectBuilder.php
+++ b/tests/phpunit/MockObjectBuilder.php
@@ -345,6 +345,10 @@
->method( 'getText' )
->will( $this->returnValue( $this->setValue( 'getText'
) ) );
+ $revision->expects( $this->any() )
+ ->method( 'getContent' )
+ ->will( $this->returnValue( $this->setValue(
'getContent' ) ) );
+
return $revision;
}
@@ -847,4 +851,24 @@
return $titleAccess;
}
+ /**
+ * Returns a Content object
+ *
+ * @since 1.9
+ *
+ * @return Content
+ */
+ public function getMockContent() {
+
+ $content = $this->getMockBuilder( 'Content' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $content->expects( $this->any() )
+ ->method( 'getParserOutput' )
+ ->will( $this->returnValue( $this->setValue(
'getParserOutput' ) ) );
+
+ return $content;
+ }
+
}
--
To view, visit https://gerrit.wikimedia.org/r/77503
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9c60bb7385e4257fdba592cf0c8d82fb8dc9b4a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Mwjames <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits