Although, i just found a class QueryFactory, that has a function 
newQueryResult( Store $store, Query $query, $results = array(), $continue = 
false ) that might be of use.
Maybe James HK has a better idea.

> -------- Original Message --------
> Subject: Re: [SMW-devel] SMWQueryResult mock object for testing 
> SemanticResultFormat
> Local Time: August 3, 2017 12:38 PM
> UTC Time: August 3, 2017 10:38 AM
> From: s7ep...@protonmail.com
> To: planetenxin <planeten...@web.de>
> Semediawiki-devel@lists.sourceforge.net 
> <Semediawiki-devel@lists.sourceforge.net>
> I don't think so, unfortunately.
>
>> -------- Original Message --------
>> Subject: Re: [SMW-devel] SMWQueryResult mock object for testing 
>> SemanticResultFormat
>> Local Time: August 3, 2017 12:02 PM
>> UTC Time: August 3, 2017 10:02 AM
>> From: planeten...@web.de
>> To: Stephan Gambke <s7ep...@protonmail.com>
>> Semediawiki-devel@lists.sourceforge.net 
>> <Semediawiki-devel@lists.sourceforge.net>
>> Stephan, thanks for your feedback. In the meanwhile I had another idea.
>> How about creating test data from serialized SMWQueryResults?
>> I saw, that SMWQueryResult provides a serializeToArray() function [1].
>> Is there an easy way to "unserializeFromArray()"?
>> [1]
>> https://doc.semantic-mediawiki.org/classSMWQueryResult.html#a275ce1f7f02fe2e13ad73f49512185b6
>> Am 03.08.2017 um 09:58 schrieb Stephan Gambke:
>>> Yes, SRF does not have a lot of testing, so thx for improving and sorry
>>> for not having much to copy from! Maybe [0] could give you an idea on
>>> how to create your mock object. See [1] for documentation on how to work
>>> with mock objects.
>>>
>>> Cheers
>>> Stephan
>>>
>>> [0]
>>> https://github.com/SemanticMediaWiki/SemanticResultFormats/blob/master/tests/phpunit/Unit/Formats/TreeTest.php#L56
>>>
>>>
>>>
>>> [1]
>>> https://phpunit.de/manual/4.8/en/test-doubles.html#test-doubles.mock-objects
>>>
------------------------------------------------------------------------------
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