Hi,

> CoreMockObjectRepository Class [4] but could not find an example how to
> create a mock for SMWQueryResult.

Please avoid using this object, it was created in the past and has
since been considered to be deprecated with any remaining consumers to
be converted in future.

> @mwjames: any ideas suggestions from your side?

In anticipation that I find time during the weekend, I will comment on [0].

PS: Classes marked with @private annotation [1] are not be considered
for use outside of SMW-core.

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/2589

[1] https://www.semantic-mediawiki.org/wiki/Coding_conventions#Class_annotations

Cheers

On 8/3/17, planetenxin <planeten...@web.de> wrote:
> I want to enhance existing SRF graph format test. My idea is, to create
> a mock SMWQueryResult (=test data) that will be passed to function
> getResultText (at the moment, could be getGraphvizCode or something later).
>
> I had a look at existing tests [1] and docs [2][3] as well as
> CoreMockObjectRepository Class [4] but could not find an example how to
> create a mock for SMWQueryResult.
>
> Is creating a mock for SMWQueryResult a good idea at all?
>
> Could someone help with an example?
>
> Many thx!
>
> [1]
> https://github.com/SemanticMediaWiki/SemanticResultFormats/tree/master/tests/phpunit/Unit/Formats
> [2] https://www.semantic-mediawiki.org/wiki/Help:Using_mock_objects
> [3]
> https://www.semantic-mediawiki.org/wiki/Writing_result_printers#Writing_tests
> [4]
> https://doc.semantic-mediawiki.org/classSMW_1_1Tests_1_1Utils_1_1Mock_1_1CoreMockObjectRepository.html#a0346be0a0d6284eaea8e79228455ac09
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Semediawiki-devel mailing list
> Semediawiki-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to