Goal
includes/api/KnowledgeGraphApiLoadProperties.php:31-63 — execute() is completely untested; only getExamplesMessages() is covered.
Test scenarios
inversePropsIncluded=true additionally generates -property entries for each given property.
inversePropsIncluded=false/unset: no inverse entries.
- Multiple nodes (
|-separated in the nodes parameter) are processed individually.
- Unknown/invalid titles are skipped.
- Titles already present in
self::$data are not processed again.
- Interaction with
KnowledgeGraph::setSemanticDataFromApi() with the correct parameters.
- The result is correctly returned as JSON via
$result->addValue().
Mocking pattern
- The simplest of the three API classes (no direct SMW store dependency in
execute()), so a good entry point.
setSemanticDataFromApi() may need to be mocked/isolated, or tested with real fixture titles (see the "tests for the main path of setSemanticDataFromApi" issue).
Part of the "raise PHP coverage to ~70%" effort.
Goal
includes/api/KnowledgeGraphApiLoadProperties.php:31-63—execute()is completely untested; onlygetExamplesMessages()is covered.Test scenarios
inversePropsIncluded=trueadditionally generates-propertyentries for each given property.inversePropsIncluded=false/unset: no inverse entries.|-separated in thenodesparameter) are processed individually.self::$dataare not processed again.KnowledgeGraph::setSemanticDataFromApi()with the correct parameters.$result->addValue().Mocking pattern
execute()), so a good entry point.setSemanticDataFromApi()may need to be mocked/isolated, or tested with real fixture titles (see the "tests for the main path of setSemanticDataFromApi" issue).Part of the "raise PHP coverage to ~70%" effort.