From 5c6455a7a3e66fdd175e36a7986bf6fdae9e5ad5 Mon Sep 17 00:00:00 2001 From: mwjames Date: Sat, 10 Dec 2016 03:41:44 +0100 Subject: [PATCH] Tidy (JsonTestCaseScriptRunnerTest), refs 1981, 2050 --- composer.json | 3 +- tests/README.md | 18 +- tests/autoloader.php | 11 +- .../Integration/ByJsonScript/README.md | 178 ---------------- .../Fixtures/P106.txt} | 0 .../Fixtures/image-upload-480.png} | Bin .../Fixtures/image-upload-88.png} | Bin .../Fixtures/p-0211.1.txt} | 0 .../Fixtures/p-0211.2.txt} | 0 .../Fixtures/p-0211.3.txt} | 0 .../Fixtures}/p-0439.de.txt | 0 .../Fixtures}/p-0439.fr.txt | 0 .../Fixtures}/skos-import.txt | 0 .../JsonTestCaseScriptRunnerTest.php} | 48 ++--- .../ParserTestCaseProcessor.php | 2 +- .../QueryTestCaseInterpreter.php | 2 +- .../QueryTestCaseProcessor.php | 2 +- .../phpunit/Integration/JSONScript/README.md | 178 ++++++++++++++++ .../RdfTestCaseProcessor.php | 2 +- .../SpecialPageTestCaseProcessor.php | 2 +- .../TestCases}/f-0001.json | 0 .../TestCases}/f-0101.json | 0 .../TestCases}/f-0102.json | 0 .../TestCases}/f-0103.json | 0 .../TestCases}/f-0201.json | 0 .../TestCases}/f-0202.json | 0 .../TestCases}/f-0203.json | 0 .../TestCases}/f-0204.json | 0 .../TestCases}/f-0205.json | 0 .../TestCases}/f-0206.json | 0 .../TestCases}/f-0207.json | 0 .../TestCases}/f-0208.json | 0 .../TestCases}/f-0209.json | 0 .../TestCases}/f-0210.json | 0 .../TestCases}/f-0301.json | 0 .../TestCases}/f-0302.json | 0 .../TestCases}/f-0303.json | 0 .../TestCases}/f-0801.json | 0 .../TestCases}/f-0802.json | 0 .../TestCases}/f-0803.json | 0 .../TestCases}/p-0101.json | 0 .../TestCases}/p-0102.json | 0 .../TestCases}/p-0106.json | 0 .../TestCases}/p-0107.json | 0 .../TestCases}/p-0202.json | 0 .../TestCases}/p-0203.json | 0 .../TestCases}/p-0204.json | 0 .../TestCases}/p-0205.json | 0 .../TestCases}/p-0206.json | 0 .../TestCases}/p-0207.json | 0 .../TestCases}/p-0208.json | 0 .../TestCases}/p-0209.json | 0 .../TestCases}/p-0210.json | 0 .../TestCases}/p-0211.json | 6 +- .../TestCases}/p-0212.json | 0 .../TestCases}/p-0301.json | 0 .../TestCases}/p-0302.json | 0 .../TestCases}/p-0401.json | 0 .../TestCases}/p-0402.json | 0 .../TestCases}/p-0403.json | 0 .../TestCases}/p-0404.json | 0 .../TestCases}/p-0405.json | 0 .../TestCases}/p-0406.json | 0 .../TestCases}/p-0407.json | 0 .../TestCases}/p-0408.json | 0 .../TestCases}/p-0409.json | 0 .../TestCases}/p-0410.json | 0 .../TestCases}/p-0411.json | 0 .../TestCases}/p-0412.json | 0 .../TestCases}/p-0413.json | 0 .../TestCases}/p-0414.json | 0 .../TestCases}/p-0415.json | 0 .../TestCases}/p-0416.json | 0 .../TestCases}/p-0417.json | 0 .../TestCases}/p-0418.json | 0 .../TestCases}/p-0419.json | 0 .../TestCases}/p-0420.json | 0 .../TestCases}/p-0421.json | 0 .../TestCases}/p-0422.json | 0 .../TestCases}/p-0423.json | 0 .../TestCases}/p-0424.json | 0 .../TestCases}/p-0425.json | 0 .../TestCases}/p-0426.json | 0 .../TestCases}/p-0427.json | 0 .../TestCases}/p-0428.json | 0 .../TestCases}/p-0429.json | 0 .../TestCases}/p-0430.json | 0 .../TestCases}/p-0431.json | 0 .../TestCases}/p-0432.json | 0 .../TestCases}/p-0433.json | 0 .../TestCases}/p-0434.json | 0 .../TestCases}/p-0435.json | 0 .../TestCases}/p-0436.json | 2 +- .../TestCases}/p-0437.json | 4 +- .../TestCases}/p-0438.json | 0 .../TestCases}/p-0439.json | 4 +- .../TestCases}/p-0440.json | 0 .../TestCases}/p-0441.json | 0 .../TestCases}/p-0501.json | 0 .../TestCases}/p-0701.json | 0 .../TestCases}/p-0702.json | 0 .../TestCases}/p-0703.json | 0 .../TestCases}/p-0704.json | 0 .../TestCases}/p-0705.json | 2 +- .../TestCases}/p-0901.json | 0 .../TestCases}/p-0902.json | 0 .../TestCases}/p-0903.json | 0 .../TestCases}/p-0904.json | 0 .../TestCases}/p-0905.json | 0 .../TestCases}/p-0906.json | 0 .../TestCases}/p-0907.json | 0 .../TestCases}/q-0101.json | 0 .../TestCases}/q-0102.json | 0 .../TestCases}/q-0103.json | 0 .../TestCases}/q-0104.json | 0 .../TestCases}/q-0201.json | 0 .../TestCases}/q-0202.json | 0 .../TestCases}/q-0203.json | 0 .../TestCases}/q-0204.json | 0 .../TestCases}/q-0301.json | 0 .../TestCases}/q-0401.json | 0 .../TestCases}/q-0402.json | 0 .../TestCases}/q-0501.json | 0 .../TestCases}/q-0502.json | 0 .../TestCases}/q-0503.json | 0 .../TestCases}/q-0601.json | 0 .../TestCases}/q-0602.json | 0 .../TestCases}/q-0603.json | 0 .../TestCases}/q-0604.json | 0 .../TestCases}/q-0605.json | 0 .../TestCases}/q-0606.json | 0 .../TestCases}/q-0607.json | 0 .../TestCases}/q-0608.json | 0 .../TestCases}/q-0609.json | 0 .../TestCases}/q-0610.json | 0 .../TestCases}/q-0611.json | 0 .../TestCases}/q-0612.json | 0 .../TestCases}/q-0613.json | 0 .../TestCases}/q-0701.json | 0 .../TestCases}/q-0702.json | 0 .../TestCases}/q-0703.json | 0 .../TestCases}/q-0704.json | 0 .../TestCases}/q-0801.json | 0 .../TestCases}/q-0802.json | 0 .../TestCases}/q-0803.json | 0 .../TestCases}/q-0901.json | 0 .../TestCases}/q-0902.json | 0 .../TestCases}/q-0903.json | 0 .../TestCases}/q-0904.json | 0 .../TestCases}/q-0905.json | 0 .../TestCases}/q-1002.json | 0 .../TestCases}/q-1003.json | 0 .../TestCases}/q-1004.json | 0 .../TestCases}/q-1101.json | 0 .../TestCases}/q-1102.json | 0 .../TestCases}/q-1103.json | 0 .../TestCases}/q-1104.json | 0 .../TestCases}/q-1105.json | 0 .../TestCases}/q-1106.json | 0 .../TestCases}/q-1107.json | 0 .../TestCases}/q-1108.json | 0 .../TestCases}/r-0001.json | 0 .../TestCases}/r-0002.json | 0 .../TestCases}/r-0003.json | 0 .../TestCases}/r-0004.json | 0 .../TestCases}/r-0005.json | 0 .../TestCases}/r-0006.json | 0 .../TestCases}/r-0007.json | 0 .../TestCases}/r-0008.json | 0 .../TestCases}/r-0009.json | 0 .../TestCases}/r-0010.json | 0 .../TestCases}/r-0011.json | 2 +- .../TestCases}/s-0001.json | 0 .../TestCases}/s-0002.json | 0 .../TestCases}/s-0003.json | 0 .../TestCases}/s-0004.json | 0 .../TestCases}/s-0005.json | 0 .../TestCases}/s-0006.json | 0 .../TestCases}/s-0007.json | 0 .../TestCases}/s-0008.json | 0 .../TestCases}/s-0009.json | 0 .../TestCases}/s-0010.json | 0 .../TestCases}/s-0011.json | 0 .../TestCases}/s-0012.json | 2 +- .../readmeContentsBuilder.php | 13 +- .../version2TestCaseConverter.php | 2 +- tests/phpunit/JsonTestCaseContentHandler.php | 196 ++++++++++++++++++ ...vider.php => JsonTestCaseScriptRunner.php} | 186 ++++++++--------- tests/phpunit/Utils/File/DummyFileCreator.php | 24 +-- tests/phpunit/Utils/File/LocalFileUpload.php | 72 ++++++- .../Utils/Fixtures/FixturesFileProvider.php | 8 +- tests/phpunit/Utils/PageCreator.php | 43 ++-- tests/phpunit/Utils/UtilityFactory.php | 20 +- 193 files changed, 642 insertions(+), 390 deletions(-) delete mode 100644 tests/phpunit/Integration/ByJsonScript/README.md rename tests/phpunit/Integration/{ByJsonScript/Contents/p-0436.json => JSONScript/Fixtures/P106.txt} (100%) rename tests/phpunit/Integration/{ByJsonScript/Contents/test-file-480.png => JSONScript/Fixtures/image-upload-480.png} (100%) rename tests/phpunit/Integration/{ByJsonScript/Contents/test-file-88.png => JSONScript/Fixtures/image-upload-88.png} (100%) rename tests/phpunit/Integration/{ByJsonScript/Contents/p-0211.1.json => JSONScript/Fixtures/p-0211.1.txt} (100%) rename tests/phpunit/Integration/{ByJsonScript/Contents/p-0211.2.json => JSONScript/Fixtures/p-0211.2.txt} (100%) rename tests/phpunit/Integration/{ByJsonScript/Contents/p-0211.3.json => JSONScript/Fixtures/p-0211.3.txt} (100%) rename tests/phpunit/Integration/{ByJsonScript/Contents => JSONScript/Fixtures}/p-0439.de.txt (100%) rename tests/phpunit/Integration/{ByJsonScript/Contents => JSONScript/Fixtures}/p-0439.fr.txt (100%) rename tests/phpunit/Integration/{ByJsonScript/Contents => JSONScript/Fixtures}/skos-import.txt (100%) rename tests/phpunit/Integration/{ByJsonScript/ByJsonScriptFixtureTestCaseRunnerTest.php => JSONScript/JsonTestCaseScriptRunnerTest.php} (88%) rename tests/phpunit/Integration/{ByJsonScript => JSONScript}/ParserTestCaseProcessor.php (98%) rename tests/phpunit/Integration/{ByJsonScript => JSONScript}/QueryTestCaseInterpreter.php (99%) rename tests/phpunit/Integration/{ByJsonScript => JSONScript}/QueryTestCaseProcessor.php (99%) create mode 100644 tests/phpunit/Integration/JSONScript/README.md rename tests/phpunit/Integration/{ByJsonScript => JSONScript}/RdfTestCaseProcessor.php (98%) rename tests/phpunit/Integration/{ByJsonScript => JSONScript}/SpecialPageTestCaseProcessor.php (98%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0001.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0101.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0102.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0103.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0201.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0202.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0203.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0204.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0205.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0206.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0207.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0208.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0209.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0210.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0301.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0302.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0303.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0801.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0802.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/f-0803.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0101.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0102.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0106.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0107.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0202.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0203.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0204.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0205.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0206.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0207.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0208.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0209.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0210.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0211.json (91%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0212.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0301.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0302.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0401.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0402.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0403.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0404.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0405.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0406.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0407.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0408.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0409.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0410.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0411.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0412.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0413.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0414.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0415.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0416.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0417.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0418.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0419.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0420.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0421.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0422.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0423.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0424.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0425.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0426.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0427.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0428.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0429.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0430.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0431.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0432.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0433.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0434.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0435.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0436.json (98%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0437.json (81%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0438.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0439.json (96%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0440.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0441.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0501.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0701.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0702.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0703.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0704.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0705.json (97%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0901.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0902.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0903.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0904.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0905.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0906.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/p-0907.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0101.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0102.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0103.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0104.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0201.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0202.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0203.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0204.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0301.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0401.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0402.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0501.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0502.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0503.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0601.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0602.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0603.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0604.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0605.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0606.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0607.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0608.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0609.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0610.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0611.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0612.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0613.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0701.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0702.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0703.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0704.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0801.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0802.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0803.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0901.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0902.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0903.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0904.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-0905.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-1002.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-1003.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-1004.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-1101.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-1102.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-1103.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-1104.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-1105.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-1106.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-1107.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/q-1108.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/r-0001.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/r-0002.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/r-0003.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/r-0004.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/r-0005.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/r-0006.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/r-0007.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/r-0008.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/r-0009.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/r-0010.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/r-0011.json (98%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/s-0001.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/s-0002.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/s-0003.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/s-0004.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/s-0005.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/s-0006.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/s-0007.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/s-0008.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/s-0009.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/s-0010.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/s-0011.json (100%) rename tests/phpunit/Integration/{ByJsonScript/Fixtures => JSONScript/TestCases}/s-0012.json (97%) rename tests/phpunit/Integration/{ByJsonScript => JSONScript}/readmeContentsBuilder.php (80%) rename tests/phpunit/Integration/{ByJsonScript => JSONScript}/version2TestCaseConverter.php (99%) create mode 100644 tests/phpunit/JsonTestCaseContentHandler.php rename tests/phpunit/{ByJsonTestCaseProvider.php => JsonTestCaseScriptRunner.php} (54%) diff --git a/composer.json b/composer.json index c4b704efa8..9fd484279d 100644 --- a/composer.json +++ b/composer.json @@ -87,8 +87,9 @@ "phpunit": "php ../../tests/phpunit/phpunit.php -c phpunit.xml.dist", "unit": [ "composer dump-autoload", - "php ../../tests/phpunit/phpunit.php -c phpunit.xml.dist --testsuite=semantic-mediawiki-unit" + "composer phpunit -- --testsuite=semantic-mediawiki-unit" ], + "integration": "composer phpunit -- --testsuite=semantic-mediawiki-integration", "cs-standalone": [ "composer validate --no-interaction", "vendor/bin/phpcs src/* includes/* tests/* --standard=phpcs.xml --extensions=php -sp" diff --git a/tests/README.md b/tests/README.md index 6b34b25123..c92355790c 100644 --- a/tests/README.md +++ b/tests/README.md @@ -50,14 +50,20 @@ For a short introduction on "How to write a test for Semantic MediaWiki", have a ### Test cases -The use of `MediaWikiTestCase` is discouraged as its binds tests and the test environment to MediaWiki. Generally it is best to use `PHPUnit_Framework_TestCase` and in case where a MW database connection is required `MwDBaseUnitTestCase` should be used instead. +The use of `MediaWikiTestCase` is discouraged as its binds tests and the test +environment to MediaWiki. Generally it is best to use `PHPUnit_Framework_TestCase` +and in case where a MW database connection is required `MwDBaseUnitTestCase` +should be used instead. * `QueryPrinterTestCase` base class for all query and result printers * `SpecialPageTestCase` derives from `SemanticMediaWikiTestCase` ## Integration tests -Integration tests are vital to confirm expected behaviour of a component from an integrative perspective that occurs through the interplay with its surroundings. `SMW\Tests\Integration\` contains most of the tests that target the validation of reciprocity with MediaWiki and/or other services such as: +Integration tests are vital to confirm expected behaviour of a component from an +integrative perspective that occurs through the interplay with its surroundings. +`SMW\Tests\Integration\` contains most of the tests that target the validation of +reciprocity with MediaWiki and/or other services such as: - `SPARQLStore` ( `fuseki`, `virtuoso`, `blazegraph`, or `sesame` ) - Extensions such as `SM`, `SESP`, `SBL` etc. @@ -72,7 +78,7 @@ down process for each test execution. The script like test definition was introduced to lower the barrier of understanding of what is being tested by using a wikitext notation (internally PHPUnit is used -by the `ByJsonTestCaseProvider` to run/provide the actually test). +by the `JsonTestCaseScriptRunner` to run/provide the actually test). A new test file (with different test cases) is automatically added by a `TestCaseRunner` as soon as it is placed within the location expected by the runner. @@ -142,7 +148,7 @@ it is recommended to fix the settings for a test by adding something like: } -A complete list of available `json` test files can be found [here](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/README.md). +A complete list of available `json` test files can be found [here](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/README.md). ## Benchmark tests @@ -150,7 +156,9 @@ For details, please have a look at the [benchmark guide](phpunit/Benchmark/READM # JavaScript (QUnit) -Running qunit tests in connection with MediaWiki requires to execute [Special:JavaScriptTest][mw-qunit-testing]. QUnit tests are currently not executed on Travis (see [#136][issue-136]). +Running qunit tests in connection with MediaWiki requires to execute +[Special:JavaScriptTest][mw-qunit-testing]. QUnit tests are currently not +executed on Travis (see [#136][issue-136]). # Miscellaneous * [Writing testable code](https://semantic-mediawiki.org/wiki/Help:Writing_testable_code) diff --git a/tests/autoloader.php b/tests/autoloader.php index 32a939bb11..c372e2ff43 100644 --- a/tests/autoloader.php +++ b/tests/autoloader.php @@ -57,10 +57,19 @@ $autoloader->addClassMap( array( 'SMW\Tests\TestEnvironment' => __DIR__ . '/phpunit/TestEnvironment.php', 'SMW\Tests\MwDBaseUnitTestCase' => __DIR__ . '/phpunit/MwDBaseUnitTestCase.php', - 'SMW\Tests\ByJsonTestCaseProvider' => __DIR__ . '/phpunit/ByJsonTestCaseProvider.php', + 'SMW\Tests\JsonTestCaseScriptRunner' => __DIR__ . '/phpunit/JsonTestCaseScriptRunner.php', 'SMW\Tests\JsonTestCaseFileHandler' => __DIR__ . '/phpunit/JsonTestCaseFileHandler.php', + 'SMW\Tests\JsonTestCaseContentHandler' => __DIR__ . '/phpunit/JsonTestCaseContentHandler.php', 'SMW\Test\QueryPrinterTestCase' => __DIR__ . '/phpunit/QueryPrinterTestCase.php', 'SMW\Test\QueryPrinterRegistryTestCase' => __DIR__ . '/phpunit/QueryPrinterRegistryTestCase.php', ) ); +/** + * @since 2.5 + * + * Shoudl be removed once all external references have been renamed. + */ +class_alias( 'SMW\Tests\JsonTestCaseScriptRunner', 'SMW\Tests\ByJsonTestCaseProvider' ); + + return $autoloader; diff --git a/tests/phpunit/Integration/ByJsonScript/README.md b/tests/phpunit/Integration/ByJsonScript/README.md deleted file mode 100644 index e82a53e88a..0000000000 --- a/tests/phpunit/Integration/ByJsonScript/README.md +++ /dev/null @@ -1,178 +0,0 @@ -## Fixtures -Contains 164 files: - -### F -* [f-0001.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0001.json) Test `format=debug` output -* [f-0101.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0101.json) Test `format=template` output using unnamed arguments (#885) -* [f-0102.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0102.json) Test `format=template` output + unicode characters (#988, skip postgres) -* [f-0103.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0103.json) Test `format=template` with self reference (#988, guard against template self-reference in ask/show query) -* [f-0201.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0201.json) Test `format=table` on boolean table output formatting (#896, #1464) -* [f-0202.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0202.json) Test `format=table` with sep cell formatting, #495 (`wgContLang=en`,`wgLang=en`) -* [f-0203.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0203.json) Test `format=table` to sort by category (#1286) -* [f-0204.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0204.json) Test `format=table` on `_qty` for different positional unit preference (#1329, en) -* [f-0205.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0205.json) Test `format=table` on `|+align=`/`|+limit`/`|+order` extra printout parameters (T18571, en) -* [f-0206.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0206.json) Test `format=table` to display extra property description `_PDESC` (en) -* [f-0207.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0207.json) Test `format=table` on formatted indent when using */#/: (en) -* [f-0208.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0208.json) Test `format=table` with `limit=0` (further result links) for user/predefined properties, `mainlabel=-`, `#show` (`wgContLang=en`, `wgLang=es`) -* [f-0209.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0209.json) Test `format=table` on `_tem`/ `_num` with `LOCAL@...` output (#1591, `wgContLang=es`, `wgLang=en`) -* [f-0210.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0210.json) Test `format=table` on `_qty` for unit labels with spaces (#1718, `wgContLang=en`, `SMW_DV_NUMV_USPACE`) -* [f-0301.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0301.json) Test `format=category` with template usage (#699, en, skip postgres) -* [f-0302.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0302.json) Test `format=category` and defaultsort (#699, en) -* [f-0303.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0303.json) Test `format=category` sort output using a template and DEFAULTSORT (#1459, en) -* [f-0801.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0801.json) Test `format=embedded` output (skip 1.19) -* [f-0802.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0802.json) Test `format=template` [[SMW::on/off]] regression using `named args=yes` (#1453, skip-on 1.19) -* [f-0803.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/f-0803.json) Test `format=template` with `sep`/`named args`/`template arguments` (#972, #2022) - -### P -* [p-0101.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0101.json) Test in-text annotation for use of restricted properties (#914, `wgContLang=en`, `wgLang=en`) -* [p-0102.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0102.json) Test in-text annotation on properties with invalid names/charaters (#1567, #1638, #1727 `wgContLang=en`) -* [p-0106.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0106.json) Test #info parser output (#1019, `wgContLang=en`, `wgLang=en`) -* [p-0107.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0107.json) Test #smwdoc parser output (#1019, en) -* [p-0202.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0202.json) Test #set parser to use template for output (#1146, en) -* [p-0203.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0203.json) Test #set parser in combination with #subobject and template output (#1067, regression check) -* [p-0204.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0204.json) Test #set parser to produce error output (#870, en, verify that #set calls do not affect each other with previous errors) -* [p-0205.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0205.json) Test #set/#ask recursive annotation support (#711, #1055, recursive annotation using import-annotation=true via template) -* [p-0206.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0206.json) Test #show parser on inverse printrequest (#1222, #1223) -* [p-0207.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0207.json) Test that undeclared properties with references remain after a `rebuildData` run (#1216, en) -* [p-0208.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0208.json) Test `#set` for various `_num` values without explicit precision (3 digit implicit), with/without leading zero, different printouts, negative numbers (#753, en, `smwgMaxNonExpNumber`) -* [p-0209.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0209.json) Test `#set` for various `_qty` values without explicit precision (3 digit implicit), with/without leading zero, and different printouts (#753, en, `smwgMaxNonExpNumber`) -* [p-0210.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0210.json) Test `#set_recurring_event` (`wgContLang=en`, `wgLang=en`) -* [p-0211.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0211.json) Test `#set`/`#subobject` to import annotation via `@json` syntax (`wgContLang=en`, `wgLang=en`) -* [p-0212.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0212.json) Test `@@@` in-text annotation syntax (#1855, #1875 `wgContLang=en`, `wgLang=en`) -* [p-0301.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0301.json) Test #subobject category annotation (#1172) -* [p-0302.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0302.json) Test #subobject parser to use invalid assignments and create `_ERRC` (#1299, en) -* [p-0401.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0401.json) Test annotations with disabled capital links (#673, `wgCapitalLinks=false`) -* [p-0402.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0402.json) Test in-text parsing for double colon annotation such as `::::` or `:::` (#1066, #1075, en) -* [p-0403.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0403.json) Test in-text annotations being disabled for when Factbox contains extra `[[ ... ]]` (#1126) -* [p-0404.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0404.json) Test in-text annonation on different category colon identifier -* [p-0405.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0405.json) Test in-text annotation via template and manual redirect (#895) -* [p-0406.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0406.json) Test in-text annotation for unrestricted template parse using `import-annotation=true` (#1055) -* [p-0407.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0407.json) Test in-text annotation for a redirect that is pointing to a deleted target (#1105) -* [p-0408.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0408.json) Test in-text annotation for multiple property assignment using non-strict parser mode (#1252, en) -* [p-0409.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0409.json) Test in-text annotation for `_rec`/`_mlt_rec` (+ subobject) for when record type points to another record type (`wgContLang=en`, `wgLang=en`) -* [p-0410.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0410.json) Test in-text annotation on `_num`/`_tem`/`_qty` type with denoted precision (`_PREC`) and/or `-p` printout precision marker (#1335, en) -* [p-0411.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0411.json) Test in-text annotation (and #subobject) using a monolingual property (#1344, en) -* [p-0412.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0412.json) Test in-text annotation for `_boo` datatype (`wgContLang=ja`, `wgLang=ja`) -* [p-0413.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0413.json) Test in-text annotation for different `_dat` input/output (en, skip virtuoso, `smwgDVFeatures`) -* [p-0414.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0414.json) Test in-text annotation/free format for `_dat` datatype (#1389, #1401, en, `smwgDVFeatures`) -* [p-0415.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0415.json) Test in-text annotation on `_tem` with display unit preference (en) -* [p-0416.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0416.json) Test in-text annotation with DISPLAYTITLE (#1410, #1611, `wgRestrictDisplayTitle`, `wgContLang=en`, `wgLang=en`) -* [p-0417.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0417.json) Test in-text annotation for `Allows pattern` to match regular expressions (en) -* [p-0418.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0418.json) Test in-text annotation using `_SERV` as provide service links (en) -* [p-0419.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0419.json) Test in-text annotation for `_PVUC` to validate uniqueness (`smwgDVFeatures`) -* [p-0420.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0420.json) Test in-text annotation for `_dat` using JL/GR annotated values (en, `smwgDVFeatures`) -* [p-0421.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0421.json) Test in-text annotation with combined constraint validation (`smwgDVFeatures`) -* [p-0422.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0422.json) Test in-text annotation `_dat` on partial dates (en) -* [p-0423.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0423.json) Test in-text annotation / `#ask` (#MEDIAWIKI, #LOCL) output for `_dat` datatype (#1545, `wgContLang=en`, `wgLang=ja`) -* [p-0424.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0424.json) Test in-text annotation for `_boo` datatype using `LOCL` (`wgContLang=en`, `wgLang=fr`, skip-on 1.25.6) -* [p-0425.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0425.json) Test in-text annotation on `_tem`/ `_num` with different page content language (#1591, `wgContLang=es`, `wgLang=en`) -* [p-0426.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0426.json) Test in-text annotation for `_num` on big/small numbers/scientific notation (`wgContLang=fr`, `wgLang=en`) -* [p-0427.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0427.json) Test in-text annotation with DISPLAYTITLE / `foaf` to check on upper vs. lower case (`wgRestrictDisplayTitle`, `wgContLang=en`, `wgLang=en`) -* [p-0428.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0428.json) Test `_TYPE` annotations on different content language (`wgContLang=fr`, `wgLang=en`) -* [p-0429.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0429.json) Test in-text `_dat` annotation with time offset, time zone, am/pm (`wgContLang=en`, `wgLang=en`) -* [p-0430.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0430.json) Test in-text annotation for '_eid' type (`wgContLang=en`, `wgLang=en`) -* [p-0431.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0431.json) Test in-text annotation `_rec` and `|+index` (`wgContLang=en`, `wgLang=en`) -* [p-0432.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0432.json) Test in-text annotation for `_ref_rec` type (#1808, `wgContLang=en`, `wgLang=en`) -* [p-0433.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0433.json) Test in-text annotation `::` with left pipe (#1747, `wgContLang=en`, `smwgLinksInValues=false`) -* [p-0434.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0434.json) Test printrequest property chaining `|?Foo.Bar` (#1824, `wgContLang=en`, `wgLang=en`) -* [p-0435.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0435.json) Test in-text annotation using `_txt` type with 255+ char, `#ask` to produce reduced length (#1878, `wgContLang=en`, `wgLang=en`) -* [p-0436.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0436.json) Test in-text annotation with `_PPLB` [preferred property label] (#1879, `wgContLang=en`, `wgLang=en`) -* [p-0437.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0437.json) Test in-text annotation with `_PPLB` [preferred property label] (#1879, `wgContLang=en`, `wgLang=ja`) -* [p-0438.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0438.json) Test in-text annotation with preferred property label/DISPLAYTITLE on user/predefined properties (`wgContLang=es`, `wgLang=de`, `wgRestrictDisplayTitle=false`) -* [p-0439.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0439.json) Test in-text annotation using '_txt'/'_wpg' type / UTF encoding (`wgContLang=en`, `wgLang=en`) -* [p-0440.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0440.json) Test in-text annotation `_mlt_rec` (Monolingual text) with `|+lang`/`|+order` parameter (`wgContLang=en`, `wgLang=en`) -* [p-0441.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0441.json) Test in-text `_txt` 00 string/loose comparison (#2061) -* [p-0501.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0501.json) Test `#concept` on predefined property (`wgContLang=en`, `wgLang=es`) -* [p-0701.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0701.json) Test to create inverted annotation using a #ask/template combination (#711, `import-annotation=true`) -* [p-0702.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0702.json) Test #ask with `format=table` on inverse property/printrquest (#1270, en) -* [p-0703.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0703.json) Test `#ask` on `format=table` using different printrequest label output (#1270, `wgContLang=en`, `wgLang=en`) -* [p-0704.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0704.json) Test `#ask` sanitization of printrequest labels to avoid XSS injection (`wgContLang=en`, `wgLang=en`) -* [p-0705.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0705.json) Test `#ask`/ NS_FILE option (`wgContLang=en`, `wgLang=en`, `wgEnableUploads`, `wgFileExtensions`, 'wgDefaultUserOptions') -* [p-0901.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0901.json) Test #ask on moved redirected subject (#1086) -* [p-0902.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0902.json) Test #ask on failed queries to produce a `_ERRC` (#1297, en) -* [p-0903.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0903.json) Test #ask on redirected printrequest (#1290, en) -* [p-0904.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0904.json) Test #ask with subject redirected to different NS (en) -* [p-0905.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0905.json) Test `#ask` query-in-query construct (`_sobj`/`_dat`/`_num`) (`wgContLang=en`, `wgLang=en`) -* [p-0906.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0906.json) Test `#ask` on category/property hierarchy with circular reference (#1713, `wgContLang=en`, `wgLang=en`, 'smwgEnabledQueryDependencyLinksStore', skip virtuoso) -* [p-0907.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/p-0907.json) Test the QueryResult cache feature (#1251, `wgContLang=en`, `wgLang=en`, `smwgQueryResultCacheType=true`) - -### Q -* [q-0101.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0101.json) Test `_txt` query for simple assignments, NS_HELP, and special chars -* [q-0102.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0102.json) Test `_txt` for `~*` regex queries to validate correct escape pattern as applied in the `QueryEngine` -* [q-0103.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0103.json) Test `_txt` for `~*` regex query with the condition to include the `\` escape character (skip sqlite, postgres) -* [q-0104.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0104.json) Test `_txt`/`~` with enabled full-text search support (only enabled for MySQL, SQLite) -* [q-0201.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0201.json) Test `_CONC` queries (skip postgres, skip virtuoso) -* [q-0202.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0202.json) Test `_CONC` for guarding against circular/self-reference which otherwise would fail with 'Maximum function nesting level ... reached, aborting' (#945, skip postgres, skip virtuoso) -* [q-0203.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0203.json) Test `_CONC` to use `CONCEPT_CACHE_ALL` (#1050, skip postgres + all SPARQL repository) -* [q-0204.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0204.json) Test `_CONC` on predefined inverse query and subobject inverse query (#1096, skip virtuoso) -* [q-0301.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0301.json) Test `_IMPO` queries for imported foaf vocabulary (#891, en) -* [q-0401.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0401.json) Test `_SUBP` on a simple 'family' subproperty hierarchy example query (#1003, skip virtuoso) -* [q-0402.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0402.json) Test `_SUBP` to map DC imported vocabulary with MARC 21 bibliographic terms (#1003, http://www.loc.gov/marc/bibliographic/bd20x24x.html) -* [q-0501.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0501.json) Test `_qty` queries for custom unit (km²/°C) property value assignments -* [q-0502.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0502.json) Test `_qty` range queries using non strict comparators (`smwStrictComparators=false`) -* [q-0503.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0503.json) Test `_qty` on positional unit preference in query condition (#1329, `smwStrictComparators=false`) -* [q-0601.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0601.json) Test `_wpg` for property chain query queries -* [q-0602.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0602.json) Test `_wpg` sort query with #subobject annotated @sortkey content -* [q-0603.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0603.json) Test `_wpg` queries for various conditions using #set annotated content -* [q-0604.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0604.json) Test `_wpg` queries to resolve property/values redirects (#467, skip virtuoso) -* [q-0605.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0605.json) Test `_wpg` regex search (`!~/~*/~?`) queries (#679) -* [q-0606.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0606.json) Test `_wpg`/`_num`/`_txt` using subqueries (#466, #627, #625) -* [q-0607.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0607.json) Test `_wpg`/`_dat`/`_num`/`_txt` subquery example -* [q-0608.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0608.json) Test `_wpg` for single value approximate (`~/!~`) queries (#1246) -* [q-0609.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0609.json) Test `_wpg` for single value approximate (`~/!~`) queries with conjunctive category hierarchy (#1246, en, skip virtuoso) -* [q-0610.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0610.json) Test `_wpg` range queries (#1291, `smwStrictComparators=false`, skip virtuoso) -* [q-0611.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0611.json) Test `_wpg` namespace any value queries (#1301, en) -* [q-0612.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0612.json) Test `_wpg` object value that contains `=` (equals sign) (#640, #710, #1542, #1645, `wgContLang=en`, `wgLang=en`) -* [q-0613.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0613.json) Test single value (`~/!~`/`<`/`>`) queries on namespaced entity (#1652, `NS_HELP`, `smwStrictComparators=false`, skip-on virtuoso) -* [q-0701.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0701.json) Test `_uri` with some annotation/search pattern (T45264, #679) -* [q-0702.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0702.json) Test `_uri` with additional annotation/search (#1129) -* [q-0703.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0703.json) Test to map `Foaf` property from back-end / using a localized predefined property `A le type@fr` (en) -* [q-0704.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0704.json) Test `_uri` long URL (255+) (#1872) -* [q-0801.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0801.json) Test `_INST` query (#1004, en) -* [q-0802.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0802.json) Test `_INST`/`_SUBC` queries (#1005, en, skip virtuoso) -* [q-0803.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0803.json) Test `_INST`/ Nested category annotation (#1012, en, skip virtuoso) category hierarchy queries -* [q-0901.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0901.json) Test `_wpg`/`_txt` on various disjunction, conjunction queries (#19, #1060, #1056, #1057) -* [q-0902.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0902.json) Test `_txt` to correctly apply parentheses for somehting like (a OR b OR c) AND d (#556) -* [q-0903.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0903.json) Test `_wpg`/`_num`/`_txt` for disjunction OR || (T31866, #1059, en) -* [q-0904.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0904.json) Test `_wpg`/`_txt` disjunction in connection with property hierarchies (#1060, en, skip virtuoso) -* [q-0905.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-0905.json) Test `_wpg`/`_txt` conjunction queries (#1362, #1060) -* [q-1002.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-1002.json) Test `_dat` range for non strict comparators (#285, `smwStrictComparators=false`, skip virtuoso) -* [q-1003.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-1003.json) Test `_dat` range for strict comparators (#285, `smwStrictComparators=true`, skip virtuoso) -* [q-1004.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-1004.json) Test `_dat` range for `~`/`!~` comparators (#1178, `smwStrictComparators=false`, skip virtuoso) -* [q-1101.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-1101.json) Test _rec for non strict comparators queries (`smwStrictComparators=false`) -* [q-1102.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-1102.json) Test `_rec` queries in combination with `_dat` `~/!~` search pattern (#1178, `smwStrictComparators=false`, skip virtuoso) -* [q-1103.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-1103.json) Test `_rec` using some additional search pattern (#1189, en) -* [q-1104.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-1104.json) Test `_rec` to find correct target for redirected property (#1244, en) -* [q-1105.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-1105.json) Test `_rec` in combination with named subobject (T49472, #1300, en, `smwStrictComparators=false`) -* [q-1106.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-1106.json) Test `_rec` with `~/!~` comparators on allowed values (#1207, `smwStrictComparators=false`) -* [q-1107.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-1107.json) Test `_rec`/`_mlt_rec`(`_PDESC`) to use property chaining (`wgContLang=en`) -* [q-1108.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/q-1108.json) Test conditions and constraint validations for allowed values `_LIST` and uniqueness `_PVUC` (#1207, `wgContLang=en`, `wgLang=en`) - -### R -* [r-0001.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/r-0001.json) Test RDF output for `_txt`/`_wpg`/`_dat` (#881) -* [r-0002.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/r-0002.json) Test RDF output for redirected pages (#882) -* [r-0003.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/r-0003.json) Test RDF output for imported foaf vocabulary (#884, en) -* [r-0004.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/r-0004.json) Test RDF output generation for `_INST`/`_SUBC` pages (#922, en) -* [r-0005.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/r-0005.json) Test RDF wiki-info output (#928, en) -* [r-0006.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/r-0006.json) Test RDF output generation for pages that contain `_rec` annotations (#1285, #1275) -* [r-0007.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/r-0007.json) Test RDF output for imported dc/gna vocabulary, owl:AnnotationProperty, owl:DatatypeProperty, owl:ObjectProperty, Equivalent URI (#795, `wgRestrictDisplayTitle`, en) -* [r-0008.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/r-0008.json) Test RDF output generation on pages that contain incoming error annotations (`wgContLang=en`, `wgLang=es`, syntax=rdf/turtle) -* [r-0009.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/r-0009.json) Test RDF output generation that contain a monolingual text annotations `_PDESC` (`wgContLang=en`, `wgLang=es`, syntax=rdf/turtle) -* [r-0010.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/r-0010.json) Test RDF output on canonical entities (`wgContLang=fr`, `wgLang=es`, syntax=rdf/turtle) -* [r-0011.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/r-0011.json) Test RDF output generation `skos` import/`skos:altLabel` as Monolingual text (`wgContLang=en`, `wgLang=en`) - -### S -* [s-0001.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/s-0001.json) Test output of `Special:Properties` (`wgContLang=en`, skip-on sqlite) -* [s-0002.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/s-0002.json) Test output from `Special:SearchByProperty` for `_num`, `_txt`, `_tel` (#1728, #2009, `wgContLang=en`, `wgLang=en`, skip-on sqlite, postgres) -* [s-0003.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/s-0003.json) Test `Special:Ask` output for `format=rdf`/`format=json`/DISPLAYTITLE (#1453, #1619, `wgRestrictDisplayTitle`, `wgContLang=en`) -* [s-0004.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/s-0004.json) Test `Special:Browse` output for `_dat` (`wgContLang=en`, `wgLang=ja`) -* [s-0005.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/s-0005.json) Test `Special:Browse` output for `_dat`, '_REDI' (`wgContLang=en`, `wgLang=en`, `smwgDVFeatures=SMW_DV_TIMEV_CM | SMW_DV_WPV_DTITLE`, `wgRestrictDisplayTitle=false`) -* [s-0006.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/s-0006.json) Test output of `Special:WantedProperties` (`wgContLang=en`, `wgLang=en`, skip-on sqlite, 1.19) -* [s-0007.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/s-0007.json) Test output of `Special:UnusedProperties` (`wgContLang=en`, `wgLang=en`, skip-on sqlite, 1.19) -* [s-0008.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/s-0008.json) Test `Special:Browse` output for `_dat`, `_boo`, `_sobj`, `_uri` (`wgContLang=en`, `wgLang=es`, skip-on 1.25.6) -* [s-0009.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/s-0009.json) Test output in `Special:Search` for SMWSearch (`wgLanguageCode=en`, `wgContLang=en`, `wgSearchType=SMWSearch`) -* [s-0010.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/s-0010.json) Test output from `Special:SearchByProperty` / `_dat` (#1922, `wgContLang=en`, `wgLang=es`, skip-on sqlite) -* [s-0011.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/s-0011.json) Test `Special:Ask` output `#ask` intro/outro link/template parse (`wgContLang=en`, `wgLang=en`) -* [s-0012.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures/s-0012.json) Test `Special:Ask` output `#ask` image/upload (#2009, `wgContLang=en`, `wgLang=en`, `wgEnableUploads`, `wgFileExtensions`) - --- Last updated on 2016-12-03 by `readmeContentsBuilder.php` diff --git a/tests/phpunit/Integration/ByJsonScript/Contents/p-0436.json b/tests/phpunit/Integration/JSONScript/Fixtures/P106.txt similarity index 100% rename from tests/phpunit/Integration/ByJsonScript/Contents/p-0436.json rename to tests/phpunit/Integration/JSONScript/Fixtures/P106.txt diff --git a/tests/phpunit/Integration/ByJsonScript/Contents/test-file-480.png b/tests/phpunit/Integration/JSONScript/Fixtures/image-upload-480.png similarity index 100% rename from tests/phpunit/Integration/ByJsonScript/Contents/test-file-480.png rename to tests/phpunit/Integration/JSONScript/Fixtures/image-upload-480.png diff --git a/tests/phpunit/Integration/ByJsonScript/Contents/test-file-88.png b/tests/phpunit/Integration/JSONScript/Fixtures/image-upload-88.png similarity index 100% rename from tests/phpunit/Integration/ByJsonScript/Contents/test-file-88.png rename to tests/phpunit/Integration/JSONScript/Fixtures/image-upload-88.png diff --git a/tests/phpunit/Integration/ByJsonScript/Contents/p-0211.1.json b/tests/phpunit/Integration/JSONScript/Fixtures/p-0211.1.txt similarity index 100% rename from tests/phpunit/Integration/ByJsonScript/Contents/p-0211.1.json rename to tests/phpunit/Integration/JSONScript/Fixtures/p-0211.1.txt diff --git a/tests/phpunit/Integration/ByJsonScript/Contents/p-0211.2.json b/tests/phpunit/Integration/JSONScript/Fixtures/p-0211.2.txt similarity index 100% rename from tests/phpunit/Integration/ByJsonScript/Contents/p-0211.2.json rename to tests/phpunit/Integration/JSONScript/Fixtures/p-0211.2.txt diff --git a/tests/phpunit/Integration/ByJsonScript/Contents/p-0211.3.json b/tests/phpunit/Integration/JSONScript/Fixtures/p-0211.3.txt similarity index 100% rename from tests/phpunit/Integration/ByJsonScript/Contents/p-0211.3.json rename to tests/phpunit/Integration/JSONScript/Fixtures/p-0211.3.txt diff --git a/tests/phpunit/Integration/ByJsonScript/Contents/p-0439.de.txt b/tests/phpunit/Integration/JSONScript/Fixtures/p-0439.de.txt similarity index 100% rename from tests/phpunit/Integration/ByJsonScript/Contents/p-0439.de.txt rename to tests/phpunit/Integration/JSONScript/Fixtures/p-0439.de.txt diff --git a/tests/phpunit/Integration/ByJsonScript/Contents/p-0439.fr.txt b/tests/phpunit/Integration/JSONScript/Fixtures/p-0439.fr.txt similarity index 100% rename from tests/phpunit/Integration/ByJsonScript/Contents/p-0439.fr.txt rename to tests/phpunit/Integration/JSONScript/Fixtures/p-0439.fr.txt diff --git a/tests/phpunit/Integration/ByJsonScript/Contents/skos-import.txt b/tests/phpunit/Integration/JSONScript/Fixtures/skos-import.txt similarity index 100% rename from tests/phpunit/Integration/ByJsonScript/Contents/skos-import.txt rename to tests/phpunit/Integration/JSONScript/Fixtures/skos-import.txt diff --git a/tests/phpunit/Integration/ByJsonScript/ByJsonScriptFixtureTestCaseRunnerTest.php b/tests/phpunit/Integration/JSONScript/JsonTestCaseScriptRunnerTest.php similarity index 88% rename from tests/phpunit/Integration/ByJsonScript/ByJsonScriptFixtureTestCaseRunnerTest.php rename to tests/phpunit/Integration/JSONScript/JsonTestCaseScriptRunnerTest.php index 4f85b6d443..22ccaa6b1c 100644 --- a/tests/phpunit/Integration/ByJsonScript/ByJsonScriptFixtureTestCaseRunnerTest.php +++ b/tests/phpunit/Integration/JSONScript/JsonTestCaseScriptRunnerTest.php @@ -1,12 +1,12 @@ createPagesFor( + $this->createPagesFrom( $jsonTestCaseFileHandler->getPageCreationSetupList(), NS_MAIN ); - - $this->testEnvironment->executePendingDeferredUpdates(); } private function doRunBeforeTest( $jsonTestCaseFileHandler ) { diff --git a/tests/phpunit/Integration/ByJsonScript/ParserTestCaseProcessor.php b/tests/phpunit/Integration/JSONScript/ParserTestCaseProcessor.php similarity index 98% rename from tests/phpunit/Integration/ByJsonScript/ParserTestCaseProcessor.php rename to tests/phpunit/Integration/JSONScript/ParserTestCaseProcessor.php index c8274ce448..3101a8b831 100644 --- a/tests/phpunit/Integration/ByJsonScript/ParserTestCaseProcessor.php +++ b/tests/phpunit/Integration/JSONScript/ParserTestCaseProcessor.php @@ -1,6 +1,6 @@ ` printout precision marker (#1335, en) +* [p-0411.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0411.json) Test in-text annotation (and #subobject) using a monolingual property (#1344, en) +* [p-0412.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0412.json) Test in-text annotation for `_boo` datatype (`wgContLang=ja`, `wgLang=ja`) +* [p-0413.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0413.json) Test in-text annotation for different `_dat` input/output (en, skip virtuoso, `smwgDVFeatures`) +* [p-0414.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0414.json) Test in-text annotation/free format for `_dat` datatype (#1389, #1401, en, `smwgDVFeatures`) +* [p-0415.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0415.json) Test in-text annotation on `_tem` with display unit preference (en) +* [p-0416.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0416.json) Test in-text annotation with DISPLAYTITLE (#1410, #1611, `wgRestrictDisplayTitle`, `wgContLang=en`, `wgLang=en`) +* [p-0417.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0417.json) Test in-text annotation for `Allows pattern` to match regular expressions (en) +* [p-0418.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0418.json) Test in-text annotation using `_SERV` as provide service links (en) +* [p-0419.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0419.json) Test in-text annotation for `_PVUC` to validate uniqueness (`smwgDVFeatures`) +* [p-0420.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0420.json) Test in-text annotation for `_dat` using JL/GR annotated values (en, `smwgDVFeatures`) +* [p-0421.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0421.json) Test in-text annotation with combined constraint validation (`smwgDVFeatures`) +* [p-0422.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0422.json) Test in-text annotation `_dat` on partial dates (en) +* [p-0423.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0423.json) Test in-text annotation / `#ask` (#MEDIAWIKI, #LOCL) output for `_dat` datatype (#1545, `wgContLang=en`, `wgLang=ja`) +* [p-0424.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0424.json) Test in-text annotation for `_boo` datatype using `LOCL` (`wgContLang=en`, `wgLang=fr`, skip-on 1.25.6) +* [p-0425.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0425.json) Test in-text annotation on `_tem`/ `_num` with different page content language (#1591, `wgContLang=es`, `wgLang=en`) +* [p-0426.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0426.json) Test in-text annotation for `_num` on big/small numbers/scientific notation (`wgContLang=fr`, `wgLang=en`) +* [p-0427.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0427.json) Test in-text annotation with DISPLAYTITLE / `foaf` to check on upper vs. lower case (`wgRestrictDisplayTitle`, `wgContLang=en`, `wgLang=en`) +* [p-0428.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0428.json) Test `_TYPE` annotations on different content language (`wgContLang=fr`, `wgLang=en`) +* [p-0429.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0429.json) Test in-text `_dat` annotation with time offset, time zone, am/pm (`wgContLang=en`, `wgLang=en`) +* [p-0430.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0430.json) Test in-text annotation for '_eid' type (`wgContLang=en`, `wgLang=en`) +* [p-0431.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0431.json) Test in-text annotation `_rec` and `|+index` (`wgContLang=en`, `wgLang=en`) +* [p-0432.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0432.json) Test in-text annotation for `_ref_rec` type (#1808, `wgContLang=en`, `wgLang=en`) +* [p-0433.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0433.json) Test in-text annotation `::` with left pipe (#1747, `wgContLang=en`, `smwgLinksInValues=false`) +* [p-0434.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0434.json) Test printrequest property chaining `|?Foo.Bar` (#1824, `wgContLang=en`, `wgLang=en`) +* [p-0435.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0435.json) Test in-text annotation using `_txt` type with 255+ char, `#ask` to produce reduced length (#1878, `wgContLang=en`, `wgLang=en`) +* [p-0436.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0436.json) Test in-text annotation with `_PPLB` [preferred property label] (#1879, `wgContLang=en`, `wgLang=en`) +* [p-0437.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0437.json) Test in-text annotation with preferred property label/`_PPLB` (#1879, `wgContLang=en`, `wgLang=ja`) +* [p-0438.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0438.json) Test in-text annotation with preferred property label/DISPLAYTITLE on user/predefined properties (`wgContLang=es`, `wgLang=de`, `wgRestrictDisplayTitle=false`) +* [p-0439.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0439.json) Test in-text annotation using '_txt'/'_wpg' type / UTF encoding (`wgContLang=en`, `wgLang=en`) +* [p-0440.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0440.json) Test in-text annotation `_mlt_rec` (Monolingual text) with `|+lang`/`|+order` parameter (`wgContLang=en`, `wgLang=en`) +* [p-0441.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0441.json) Test in-text `_txt` 00 string/loose comparison (#2061) +* [p-0501.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0501.json) Test `#concept` on predefined property (`wgContLang=en`, `wgLang=es`) +* [p-0701.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0701.json) Test to create inverted annotation using a #ask/template combination (#711, `import-annotation=true`) +* [p-0702.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0702.json) Test #ask with `format=table` on inverse property/printrquest (#1270, en) +* [p-0703.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0703.json) Test `#ask` on `format=table` using different printrequest label output (#1270, `wgContLang=en`, `wgLang=en`) +* [p-0704.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0704.json) Test `#ask` sanitization of printrequest labels to avoid XSS injection (`wgContLang=en`, `wgLang=en`) +* [p-0705.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0705.json) Test `#ask`/ NS_FILE option (`wgContLang=en`, `wgLang=en`, `wgEnableUploads`, `wgFileExtensions`, 'wgDefaultUserOptions') +* [p-0901.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0901.json) Test #ask on moved redirected subject (#1086) +* [p-0902.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0902.json) Test #ask on failed queries to produce a `_ERRC` (#1297, en) +* [p-0903.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0903.json) Test #ask on redirected printrequest (#1290, en) +* [p-0904.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0904.json) Test #ask with subject redirected to different NS (en) +* [p-0905.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0905.json) Test `#ask` query-in-query construct (`_sobj`/`_dat`/`_num`) (`wgContLang=en`, `wgLang=en`) +* [p-0906.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0906.json) Test `#ask` on category/property hierarchy with circular reference (#1713, `wgContLang=en`, `wgLang=en`, 'smwgEnabledQueryDependencyLinksStore', skip virtuoso) +* [p-0907.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/p-0907.json) Test the QueryResult cache feature (#1251, `wgContLang=en`, `wgLang=en`, `smwgQueryResultCacheType=true`) + +### Q +* [q-0101.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0101.json) Test `_txt` query for simple assignments, NS_HELP, and special chars +* [q-0102.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0102.json) Test `_txt` for `~*` regex queries to validate correct escape pattern as applied in the `QueryEngine` +* [q-0103.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0103.json) Test `_txt` for `~*` regex query with the condition to include the `\` escape character (skip sqlite, postgres) +* [q-0104.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0104.json) Test `_txt`/`~` with enabled full-text search support (only enabled for MySQL, SQLite) +* [q-0201.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0201.json) Test `_CONC` queries (skip postgres, skip virtuoso) +* [q-0202.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0202.json) Test `_CONC` for guarding against circular/self-reference which otherwise would fail with 'Maximum function nesting level ... reached, aborting' (#945, skip postgres, skip virtuoso) +* [q-0203.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0203.json) Test `_CONC` to use `CONCEPT_CACHE_ALL` (#1050, skip postgres + all SPARQL repository) +* [q-0204.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0204.json) Test `_CONC` on predefined inverse query and subobject inverse query (#1096, skip virtuoso) +* [q-0301.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0301.json) Test `_IMPO` queries for imported foaf vocabulary (#891, en) +* [q-0401.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0401.json) Test `_SUBP` on a simple 'family' subproperty hierarchy example query (#1003, skip virtuoso) +* [q-0402.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0402.json) Test `_SUBP` to map DC imported vocabulary with MARC 21 bibliographic terms (#1003, http://www.loc.gov/marc/bibliographic/bd20x24x.html) +* [q-0501.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0501.json) Test `_qty` queries for custom unit (km²/°C) property value assignments +* [q-0502.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0502.json) Test `_qty` range queries using non strict comparators (`smwStrictComparators=false`) +* [q-0503.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0503.json) Test `_qty` on positional unit preference in query condition (#1329, `smwStrictComparators=false`) +* [q-0601.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0601.json) Test `_wpg` for property chain query queries +* [q-0602.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0602.json) Test `_wpg` sort query with #subobject annotated @sortkey content +* [q-0603.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0603.json) Test `_wpg` queries for various conditions using #set annotated content +* [q-0604.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0604.json) Test `_wpg` queries to resolve property/values redirects (#467, skip virtuoso) +* [q-0605.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0605.json) Test `_wpg` regex search (`!~/~*/~?`) queries (#679) +* [q-0606.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0606.json) Test `_wpg`/`_num`/`_txt` using subqueries (#466, #627, #625) +* [q-0607.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0607.json) Test `_wpg`/`_dat`/`_num`/`_txt` subquery example +* [q-0608.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0608.json) Test `_wpg` for single value approximate (`~/!~`) queries (#1246) +* [q-0609.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0609.json) Test `_wpg` for single value approximate (`~/!~`) queries with conjunctive category hierarchy (#1246, en, skip virtuoso) +* [q-0610.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0610.json) Test `_wpg` range queries (#1291, `smwStrictComparators=false`, skip virtuoso) +* [q-0611.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0611.json) Test `_wpg` namespace any value queries (#1301, en) +* [q-0612.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0612.json) Test `_wpg` object value that contains `=` (equals sign) (#640, #710, #1542, #1645, `wgContLang=en`, `wgLang=en`) +* [q-0613.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0613.json) Test single value (`~/!~`/`<`/`>`) queries on namespaced entity (#1652, `NS_HELP`, `smwStrictComparators=false`, skip-on virtuoso) +* [q-0701.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0701.json) Test `_uri` with some annotation/search pattern (T45264, #679) +* [q-0702.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0702.json) Test `_uri` with additional annotation/search (#1129) +* [q-0703.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0703.json) Test to map `Foaf` property from back-end / using a localized predefined property `A le type@fr` (en) +* [q-0704.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0704.json) Test `_uri` long URL (255+) (#1872) +* [q-0801.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0801.json) Test `_INST` query (#1004, en) +* [q-0802.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0802.json) Test `_INST`/`_SUBC` queries (#1005, en, skip virtuoso) +* [q-0803.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0803.json) Test `_INST`/ Nested category annotation (#1012, en, skip virtuoso) category hierarchy queries +* [q-0901.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0901.json) Test `_wpg`/`_txt` on various disjunction, conjunction queries (#19, #1060, #1056, #1057) +* [q-0902.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0902.json) Test `_txt` to correctly apply parentheses for somehting like (a OR b OR c) AND d (#556) +* [q-0903.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0903.json) Test `_wpg`/`_num`/`_txt` for disjunction OR || (T31866, #1059, en) +* [q-0904.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0904.json) Test `_wpg`/`_txt` disjunction in connection with property hierarchies (#1060, en, skip virtuoso) +* [q-0905.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-0905.json) Test `_wpg`/`_txt` conjunction queries (#1362, #1060) +* [q-1002.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-1002.json) Test `_dat` range for non strict comparators (#285, `smwStrictComparators=false`, skip virtuoso) +* [q-1003.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-1003.json) Test `_dat` range for strict comparators (#285, `smwStrictComparators=true`, skip virtuoso) +* [q-1004.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-1004.json) Test `_dat` range for `~`/`!~` comparators (#1178, `smwStrictComparators=false`, skip virtuoso) +* [q-1101.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-1101.json) Test _rec for non strict comparators queries (`smwStrictComparators=false`) +* [q-1102.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-1102.json) Test `_rec` queries in combination with `_dat` `~/!~` search pattern (#1178, `smwStrictComparators=false`, skip virtuoso) +* [q-1103.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-1103.json) Test `_rec` using some additional search pattern (#1189, en) +* [q-1104.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-1104.json) Test `_rec` to find correct target for redirected property (#1244, en) +* [q-1105.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-1105.json) Test `_rec` in combination with named subobject (T49472, #1300, en, `smwStrictComparators=false`) +* [q-1106.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-1106.json) Test `_rec` with `~/!~` comparators on allowed values (#1207, `smwStrictComparators=false`) +* [q-1107.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-1107.json) Test `_rec`/`_mlt_rec`(`_PDESC`) to use property chaining (`wgContLang=en`) +* [q-1108.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/q-1108.json) Test conditions and constraint validations for allowed values `_LIST` and uniqueness `_PVUC` (#1207, `wgContLang=en`, `wgLang=en`) + +### R +* [r-0001.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/r-0001.json) Test RDF output for `_txt`/`_wpg`/`_dat` (#881) +* [r-0002.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/r-0002.json) Test RDF output for redirected pages (#882) +* [r-0003.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/r-0003.json) Test RDF output for imported foaf vocabulary (#884, en) +* [r-0004.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/r-0004.json) Test RDF output generation for `_INST`/`_SUBC` pages (#922, en) +* [r-0005.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/r-0005.json) Test RDF wiki-info output (#928, en) +* [r-0006.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/r-0006.json) Test RDF output generation for pages that contain `_rec` annotations (#1285, #1275) +* [r-0007.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/r-0007.json) Test RDF output for imported dc/gna vocabulary, owl:AnnotationProperty, owl:DatatypeProperty, owl:ObjectProperty, Equivalent URI (#795, `wgRestrictDisplayTitle`, en) +* [r-0008.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/r-0008.json) Test RDF output generation on pages that contain incoming error annotations (`wgContLang=en`, `wgLang=es`, syntax=rdf/turtle) +* [r-0009.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/r-0009.json) Test RDF output generation that contain a monolingual text annotations `_PDESC` (`wgContLang=en`, `wgLang=es`, syntax=rdf/turtle) +* [r-0010.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/r-0010.json) Test RDF output on canonical entities (`wgContLang=fr`, `wgLang=es`, syntax=rdf/turtle) +* [r-0011.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/r-0011.json) Test RDF output generation `skos` import/`skos:altLabel` as Monolingual text (`wgContLang=en`, `wgLang=en`) + +### S +* [s-0001.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/s-0001.json) Test output of `Special:Properties` (`wgContLang=en`, skip-on sqlite) +* [s-0002.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/s-0002.json) Test output from `Special:SearchByProperty` for `_num`, `_txt`, `_tel` (#1728, #2009, `wgContLang=en`, `wgLang=en`, skip-on sqlite, postgres) +* [s-0003.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/s-0003.json) Test `Special:Ask` output for `format=rdf`/`format=json`/DISPLAYTITLE (#1453, #1619, `wgRestrictDisplayTitle`, `wgContLang=en`) +* [s-0004.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/s-0004.json) Test `Special:Browse` output for `_dat` (`wgContLang=en`, `wgLang=ja`) +* [s-0005.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/s-0005.json) Test `Special:Browse` output for `_dat`, '_REDI' (`wgContLang=en`, `wgLang=en`, `smwgDVFeatures=SMW_DV_TIMEV_CM | SMW_DV_WPV_DTITLE`, `wgRestrictDisplayTitle=false`) +* [s-0006.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/s-0006.json) Test output of `Special:WantedProperties` (`wgContLang=en`, `wgLang=en`, skip-on sqlite, 1.19) +* [s-0007.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/s-0007.json) Test output of `Special:UnusedProperties` (`wgContLang=en`, `wgLang=en`, skip-on sqlite, 1.19) +* [s-0008.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/s-0008.json) Test `Special:Browse` output for `_dat`, `_boo`, `_sobj`, `_uri` (`wgContLang=en`, `wgLang=es`, skip-on 1.25.6) +* [s-0009.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/s-0009.json) Test output in `Special:Search` for SMWSearch (`wgLanguageCode=en`, `wgContLang=en`, `wgSearchType=SMWSearch`) +* [s-0010.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/s-0010.json) Test output from `Special:SearchByProperty` / `_dat` (#1922, `wgContLang=en`, `wgLang=es`, skip-on sqlite) +* [s-0011.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/s-0011.json) Test `Special:Ask` output `#ask` intro/outro link/template parse (`wgContLang=en`, `wgLang=en`) +* [s-0012.json](https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases/s-0012.json) Test `Special:Ask` output `#ask` image/upload (#2009, `wgContLang=en`, `wgLang=en`, `wgEnableUploads`, `wgFileExtensions`) + +-- Last updated on 2016-12-06 by `readmeContentsBuilder.php` diff --git a/tests/phpunit/Integration/ByJsonScript/RdfTestCaseProcessor.php b/tests/phpunit/Integration/JSONScript/RdfTestCaseProcessor.php similarity index 98% rename from tests/phpunit/Integration/ByJsonScript/RdfTestCaseProcessor.php rename to tests/phpunit/Integration/JSONScript/RdfTestCaseProcessor.php index 1edbdb3a29..3633b9ca28 100644 --- a/tests/phpunit/Integration/ByJsonScript/RdfTestCaseProcessor.php +++ b/tests/phpunit/Integration/JSONScript/RdfTestCaseProcessor.php @@ -1,6 +1,6 @@ 'https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/ByJsonScript/Fixtures' + 'TestCases' => 'https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/tests/phpunit/Integration/JSONScript/TestCases' ); /** @@ -28,7 +28,7 @@ public function run() { $output = ''; $dateTimeUtc = new \DateTime( 'now', new \DateTimeZone( 'UTC' ) ); - $output .= $this->doGenerateContentFor( 'Fixtures', __DIR__ . '/Fixtures' ); + $output .= $this->doGenerateContentFor( 'TestCases', __DIR__ . '/TestCases' ); $output .= "\n-- Last updated on " . $dateTimeUtc->format( 'Y-m-d' ) . " by `readmeContentsBuilder.php`". "\n"; file_put_contents( __DIR__ . '/README.md', $output ); @@ -40,6 +40,7 @@ private function doGenerateContentFor( $title, $path ) { $urlLocation = $this->urlLocationMap[$title]; $counter = 0; + $tests = 0; $previousFirstKey = ''; foreach ( $this->findFilesFor( $path, 'json' ) as $key => $location ) { @@ -60,12 +61,16 @@ private function doGenerateContentFor( $title, $path ) { $output .= " " . $contents['description']; } + if ( isset( $contents['tests'] ) ) { + $tests += count( $contents['tests'] ); + } + $output .= "\n"; $counter++; $previousFirstKey = $key{0}; } - return "## $title\n" . "Contains $counter files:\n" . $output; + return "## $title\n" . "Contains $counter files with a total of $tests tests:\n" . $output ; } private function findFilesFor( $path, $extension ) { diff --git a/tests/phpunit/Integration/ByJsonScript/version2TestCaseConverter.php b/tests/phpunit/Integration/JSONScript/version2TestCaseConverter.php similarity index 99% rename from tests/phpunit/Integration/ByJsonScript/version2TestCaseConverter.php rename to tests/phpunit/Integration/JSONScript/version2TestCaseConverter.php index 2f1df03baa..ed737a549a 100644 --- a/tests/phpunit/Integration/ByJsonScript/version2TestCaseConverter.php +++ b/tests/phpunit/Integration/JSONScript/version2TestCaseConverter.php @@ -1,6 +1,6 @@ pageCreator = $pageCreator; + $this->pageDeleter = $pageDeleter; + $this->localFileUpload = $localFileUpload; + } + + /** + * @since 2.5 + * + * @return array + */ + public function getPages() { + return $this->pages; + } + + /** + * @since 2.5 + * + * @param string $skipOn + */ + public function skipOn( $skipOn ) { + $this->skipOn = $skipOn; + } + + /** + * @since 2.5 + * + * @param string $testCaseLocation + */ + public function setTestCaseLocation( $testCaseLocation ) { + $this->testCaseLocation = $testCaseLocation; + } + + /** + * @since 2.5 + * + * @param array $pages + * @param integer $defaultNamespace + */ + public function createPagesFrom( array $pages, $defaultNamespace = NS_MAIN ) { + + foreach ( $pages as $page ) { + + $skipOn = isset( $page['skip-on'] ) ? $page['skip-on'] : array(); + + if ( in_array( $this->skipOn, array_keys( $skipOn ) ) ) { + continue; + } + + if ( ( !isset( $page['page'] ) && !isset( $page['name'] ) ) || !isset( $page['contents'] ) ) { + continue; + } + + $namespace = isset( $page['namespace'] ) ? constant( $page['namespace'] ) : $defaultNamespace; + + $this->createPage( $page, $namespace ); + } + } + + /** + * @since 2.5 + * + * @param array $page + * @param integer $defaultNamespace + */ + public function createPage( array $page, $namespace ) { + + $pageContentLanguage = isset( $page['contentlanguage'] ) ? $page['contentlanguage'] : ''; + + if ( isset( $page['message-cache'] ) && $page['message-cache'] === 'clear' ) { + Message::clear(); + } + + $name = ( isset( $page['name'] ) ? $page['name'] : $page['page'] ); + + $title = Title::newFromText( + $name, + $namespace + ); + + if ( $namespace === NS_FILE && isset( $page['contents']['upload'] ) ) { + return $this->doUploadFile( $title, $page['contents']['upload'] ); + } + + if ( is_array( $page['contents'] ) && isset( $page['contents']['import-from'] ) ) { + $contents = $this->getFileContentsWithEncodingDetection( $this->testCaseLocation . $page['contents']['import-from'] ); + } else { + $contents = $page['contents']; + } + + $this->pageCreator->createPage( $title, $contents, $pageContentLanguage ); + + $this->pages[] = $this->pageCreator->getPage(); + + if ( isset( $page['move-to'] ) ) { + $this->doMovePage( $page, $namespace ); + } + + if ( isset( $page['do-purge'] ) ) { + $this->pageCreator->getPage()->doPurge(); + } + + if ( isset( $page['do-delete'] ) && $page['do-delete'] ) { + $this->pageDeleter->deletePage( $title ); + } + } + + private function doMovePage( $page, $namespace ) { + $target = Title::newFromText( + $page['move-to']['target'], + $namespace + ); + + $this->pageCreator->doMoveTo( + $target, + $page['move-to']['is-redirect'] + ); + + $this->pages[] = $target; + } + + // http://php.net/manual/en/function.file-get-contents.php + private function getFileContentsWithEncodingDetection( $file ) { + $content = file_get_contents( $file ); + return mb_convert_encoding( $content, 'UTF-8', mb_detect_encoding( $content, 'UTF-8, ISO-8859-1, ISO-8859-2', true ) ); + } + + private function doUploadFile( $title, array $contents ) { + + $this->localFileUpload->doUploadCopyFromLocation( + $this->testCaseLocation . $contents['file'], + $title->getText(), + $contents['text'] + ); + + TestEnvironment::executePendingDeferredUpdates(); + $this->pages[] = $title; + } + +} diff --git a/tests/phpunit/ByJsonTestCaseProvider.php b/tests/phpunit/JsonTestCaseScriptRunner.php similarity index 54% rename from tests/phpunit/ByJsonTestCaseProvider.php rename to tests/phpunit/JsonTestCaseScriptRunner.php index 8f3a2f692b..d99ded02b4 100644 --- a/tests/phpunit/ByJsonTestCaseProvider.php +++ b/tests/phpunit/JsonTestCaseScriptRunner.php @@ -8,15 +8,15 @@ use Title; /** - * The JsonTestCase provider is a convenience provider for `Json` formatted + * The JsonTestCaseScriptRunner is a convenience provider for `Json` formatted * integration tests to allow writing tests quicker without the need to setup * or tear down specific data structures. * - * The json format should make it also possible for novice user to understand + * The JSON format should make it also possible for novice user to understand * what sort of tests are run as the content is based on wikitext rather than * native PHP. * - * @group semantic-mediawiki-integration + * @group semantic-mediawiki * @group medium * * @license GNU GPL v2+ @@ -24,7 +24,7 @@ * * @author mwjames */ -abstract class ByJsonTestCaseProvider extends MwDBaseUnitTestCase { +abstract class JsonTestCaseScriptRunner extends MwDBaseUnitTestCase { /** * @var FileReader @@ -32,19 +32,14 @@ abstract class ByJsonTestCaseProvider extends MwDBaseUnitTestCase { private $fileReader; /** - * @var PageCreator - */ - private $pageCreator; - - /** - * @var PageDeleter + * @var JsonTestCaseFileHandler */ - private $pageDeleter; + private $jsonTestCaseFileHandler; /** - * @var JsonTestCaseFileHandler + * @var JsonTestCaseContentHandler */ - private $jsonTestCaseFileHandler; + private $jsonTestCaseContentHandler; /** * @var array @@ -68,9 +63,13 @@ protected function setUp() { $utilityFactory->newMwHooksHandler()->deregisterListedHooks(); $utilityFactory->newMwHooksHandler()->invokeHooksFromRegistry(); - $this->fileReader = $utilityFactory->newJsonFileReader( null ); - $this->pageCreator = $utilityFactory->newPageCreator(); - $this->pageDeleter = $utilityFactory->newPageDeleter(); + $this->fileReader = $utilityFactory->newJsonFileReader(); + + $this->jsonTestCaseContentHandler = new JsonTestCaseContentHandler( + $utilityFactory->newPageCreator(), + $utilityFactory->newPageDeleter(), + $utilityFactory->newLocalFileUpload() + ); if ( $this->getStore() instanceof \SMWSparqlStore ) { $this->connectorId = strtolower( $GLOBALS['smwgSparqlDatabaseConnector'] ); @@ -89,6 +88,9 @@ protected function tearDown() { parent::tearDown(); } + /** + * @return string + */ abstract protected function getTestCaseLocation(); /** @@ -104,27 +106,58 @@ protected function getRequiredJsonTestCaseMinVersion() { } /** + * @return array + */ + protected function getAllowedTestCaseFiles() { + return array(); + } + + /** + * Normally returns TRUE but can act on the list retrieved from + * JsonTestCaseScriptRunner::getAllowedTestCaseFiles (or hereof) to filter + * selected files and help fine tune a setup or debug a potential issue + * without having to run all test files at once. + * * @param string $file + * * @return boolean */ protected function canExecuteTestCasesFor( $file ) { - return true; + + // Filter specific files on-the-fly + $allowedTestCaseFiles = $this->getAllowedTestCaseFiles(); + + if ( $allowedTestCaseFiles === array() ) { + return true; + } + + // Doesn't require the exact name + foreach ( $allowedTestCaseFiles as $fileName ) { + if ( strpos( $file, $fileName ) !== false ) { + return true; + } + } + + return false; } /** * @test * @dataProvider jsonFileProvider */ - public function executeTestCasesFor( $file ) { + public function executeTestCases( $file ) { if ( !$this->canExecuteTestCasesFor( $file ) ) { - $this->markTestSkipped( $file . ' excluded from test run' ); + $this->markTestSkipped( $file . ' excluded from the test run' ); } $this->fileReader->setFile( $file ); $this->runTestCaseFile( new JsonTestCaseFileHandler( $this->fileReader ) ); } + /** + * @return array + */ public function jsonFileProvider() { $provider = array(); @@ -142,10 +175,21 @@ public function jsonFileProvider() { return $provider; } + /** + * @since 2.2 + * + * @param mixed $key + * @param mixed $value + */ protected function changeGlobalSettingTo( $key, $value ) { $this->testEnvironment->addConfiguration( $key, $value ); } + /** + * @since 2.2 + * + * @param JsonTestCaseFileHandler $jsonTestCaseFileHandler + */ protected function checkEnvironmentToSkipCurrentTest( JsonTestCaseFileHandler $jsonTestCaseFileHandler ) { if ( $jsonTestCaseFileHandler->isIncomplete() ) { @@ -169,99 +213,37 @@ protected function checkEnvironmentToSkipCurrentTest( JsonTestCaseFileHandler $j } } - protected function createPagesFor( array $pages, $defaultNamespace ) { - - foreach ( $pages as $page ) { - - $skipOn = isset( $page['skip-on'] ) ? $page['skip-on'] : array(); - - if ( in_array( $this->connectorId, array_keys( $skipOn ) ) ) { - continue; - } - - if ( ( !isset( $page['page'] ) && !isset( $page['name'] ) ) || !isset( $page['contents'] ) ) { - continue; - } - - $namespace = isset( $page['namespace'] ) ? constant( $page['namespace'] ) : $defaultNamespace; - - $this->doCreatePage( $page, $namespace ); - } - } - - private function doCreatePage( $page, $namespace ) { - - $pageContentLanguage = isset( $page['contentlanguage'] ) ? $page['contentlanguage'] : ''; - - if ( isset( $page['message-cache'] ) && $page['message-cache'] === 'clear' ) { - Message::clear(); - } - - $name = ( isset( $page['name'] ) ? $page['name'] : $page['page'] ); + /** + * @since 2.5 + * + * @param array $pages + * @param integer $defaultNamespace + */ + protected function createPagesFrom( array $pages, $defaultNamespace = NS_MAIN ) { - $title = Title::newFromText( - $name, - $namespace + $this->jsonTestCaseContentHandler->skipOn( + $this->connectorId ); - if ( $namespace === NS_FILE && isset( $page['contents']['upload'] ) ) { - return $this->doUploadFile( $title, $page['contents']['upload'] ); - } - - if ( is_array( $page['contents'] ) && isset( $page['contents']['import-from'] ) ) { - $contents = $this->getFileContentsWithEncodingDetection( $this->getTestCaseLocation() . $page['contents']['import-from'] ); - } else { - $contents = $page['contents']; - } - - $this->pageCreator->createPage( $title, $contents, $pageContentLanguage ); - - $this->itemsMarkedForDeletion[] = $this->pageCreator->getPage(); - - if ( isset( $page['move-to'] ) ) { - $this->doMovePage( $page, $namespace ); - } - - if ( isset( $page['do-purge'] ) ) { - $this->pageCreator->getPage()->doPurge(); - } - - if ( isset( $page['do-delete'] ) && $page['do-delete'] ) { - $this->pageDeleter->deletePage( $title ); - } - } - - private function doMovePage( $page, $namespace ) { - $target = Title::newFromText( - $page['move-to']['target'], - $namespace + $this->jsonTestCaseContentHandler->setTestCaseLocation( + $this->getTestCaseLocation() ); - $this->pageCreator->doMoveTo( - $target, - $page['move-to']['is-redirect'] + $this->jsonTestCaseContentHandler->createPagesFrom( + $pages, + $defaultNamespace ); - $this->itemsMarkedForDeletion[] = $target; - } + $this->testEnvironment->executePendingDeferredUpdates(); - // http://php.net/manual/en/function.file-get-contents.php - private function getFileContentsWithEncodingDetection( $file ) { - $content = file_get_contents( $file ); - return mb_convert_encoding( $content, 'UTF-8', mb_detect_encoding( $content, 'UTF-8, ISO-8859-1, ISO-8859-2', true ) ); + $this->itemsMarkedForDeletion = $this->jsonTestCaseContentHandler->getPages(); } - private function doUploadFile( $title, $contents ) { - - $localFileUpload = $this->testEnvironment->getUtilityFactory()->newLocalFileUploadWithCopy( - $this->getTestCaseLocation() . $contents['file'], - $title->getText() - ); - - $localFileUpload->doUpload( $contents['text'] ); - - $this->testEnvironment->executePendingDeferredUpdates(); - $this->itemsMarkedForDeletion[] = $title; + /** + * @deprecated 2.5 + */ + protected function createPagesFor( array $pages, $defaultNamespace ) { + $this->createPagesFrom( $pages, $defaultNamespace ); } } diff --git a/tests/phpunit/Utils/File/DummyFileCreator.php b/tests/phpunit/Utils/File/DummyFileCreator.php index 1ae6752951..d5227279a6 100644 --- a/tests/phpunit/Utils/File/DummyFileCreator.php +++ b/tests/phpunit/Utils/File/DummyFileCreator.php @@ -31,29 +31,23 @@ class DummyFileCreator { * @since 2.1 * * @param string $desiredDestName - */ - public function __construct( $desiredDestName ) { - $this->desiredDestName = $desiredDestName; - } - - /** - * @since 2.1 * * @return string */ - public function createEmptyFile() { - $this->file = $this->createFile(); + public function createEmptyFile( $desiredDestName ) { + $this->file = $this->createFile( $desiredDestName ); } /** * @since 2.1 * + * @param string $desiredDestName * @param string $contentCopyPath * * @return string */ - public function createFileWithCopyFrom( $contentCopyPath ) { - $this->file = $this->createFile( file_get_contents( $this->getFile( $contentCopyPath ) ) ); + public function createFileWithCopyFrom( $desiredDestName, $contentCopyPath ) { + $this->file = $this->createFile( $desiredDestName, file_get_contents( $this->getFile( $contentCopyPath ) ) ); } /** @@ -72,9 +66,9 @@ public function delete() { unlink( $this->file ); } - private function createFile( $content = '' ) { + private function createFile( $desiredDestName, $content = '' ) { - $filename = $this->getLocationForTemporaryFile(); + $filename = $this->getLocationForTemporaryFile( $desiredDestName ); $fh = fopen( $filename, 'w' ); @@ -89,8 +83,8 @@ private function createFile( $content = '' ) { return $this->getFile( $filename ); } - private function getLocationForTemporaryFile() { - return sys_get_temp_dir() . '/' . $this->desiredDestName; + private function getLocationForTemporaryFile( $desiredDestName ) { + return sys_get_temp_dir() . '/' . $desiredDestName; } private function getFile( $path ) { diff --git a/tests/phpunit/Utils/File/LocalFileUpload.php b/tests/phpunit/Utils/File/LocalFileUpload.php index 974d7da554..d9deedbe72 100644 --- a/tests/phpunit/Utils/File/LocalFileUpload.php +++ b/tests/phpunit/Utils/File/LocalFileUpload.php @@ -29,6 +29,14 @@ class LocalFileUpload extends UploadBase { */ private $desiredDestName; + /** + * @var DummyFileCreator + */ + private $dummyFileCreator; + + /** + * @var string + */ private $error = ''; /** @@ -37,11 +45,20 @@ class LocalFileUpload extends UploadBase { * @param string $localUploadPath * @param string $desiredDestName */ - public function __construct( $localUploadPath, $desiredDestName ) { + public function __construct( $localUploadPath = '', $desiredDestName = '' ) { $this->localUploadPath = $localUploadPath; $this->desiredDestName = $desiredDestName; } + /** + * @since 2.5 + * + * @param DummyFileCreator $dummyFileCreator + */ + public function setDummyFileCreator( DummyFileCreator $dummyFileCreator ) { + $this->dummyFileCreator = $dummyFileCreator; + } + /** * @since 2.1 * @@ -59,19 +76,50 @@ public function delete() { } /** - * @since 2.1 + * @since 2.5 * + * @param string $localUploadPath + * @param string $desiredDestName * @param string $pageText * @param string $comment * * @return boolean */ - public function doUpload( $pageText = '', $comment = '' ) { + public function doUploadCopyFromLocation( $localUploadPath, $desiredDestName, $pageText = '', $comment = '' ) { + + if ( !$this->dummyFileCreator instanceof DummyFileCreator ) { + throw new RuntimeException( "Expected a DummyFileCreator instance." ); + } + + $this->dummyFileCreator->createFileWithCopyFrom( + $desiredDestName, + $localUploadPath + ); + + $this->doUploadFromLocation( + $this->dummyFileCreator->getPath(), + $desiredDestName, + $pageText, + $comment + ); + } + + /** + * @since 2.5 + * + * @param string $localUploadPath + * @param string $desiredDestName + * @param string $pageText + * @param string $comment + * + * @return boolean + */ + public function doUploadFromLocation( $localUploadPath, $desiredDestName, $pageText = '', $comment = '' ) { - $localUploadPath = $this->canRead( $this->localUploadPath ); + $localUploadPath = $this->createReadablePath( $localUploadPath ); $this->initializePathInfo( - $this->desiredDestName, + $desiredDestName, $localUploadPath, filesize( $localUploadPath ), $this->removeTemporaryFile @@ -92,6 +140,18 @@ public function doUpload( $pageText = '', $comment = '' ) { return true; } + /** + * @since 2.1 + * + * @param string $pageText + * @param string $comment + * + * @return boolean + */ + public function doUpload( $pageText = '', $comment = '' ) { + return $this->doUploadFromLocation( $this->localUploadPath, $this->desiredDestName, $pageText, $comment ); + } + /** * @see UploadBase::initializeFromRequest */ @@ -105,7 +165,7 @@ public function getSourceType() { return 'file'; } - private function canRead( $path ) { + private function createReadablePath( $path ) { $path = str_replace( array( '\\', '/' ), DIRECTORY_SEPARATOR, $path ); diff --git a/tests/phpunit/Utils/Fixtures/FixturesFileProvider.php b/tests/phpunit/Utils/Fixtures/FixturesFileProvider.php index ea917af742..7dc98e25ba 100644 --- a/tests/phpunit/Utils/Fixtures/FixturesFileProvider.php +++ b/tests/phpunit/Utils/Fixtures/FixturesFileProvider.php @@ -22,8 +22,8 @@ class FixturesFileProvider { */ public function newDummyJsonFile( $desiredDestName ) { - $dummyFileCreator = new DummyFileCreator( $desiredDestName ); - $dummyFileCreator->createFileWithCopyFrom( __DIR__ . '/File/' . 'LoremIpsum.json' ); + $dummyFileCreator = new DummyFileCreator(); + $dummyFileCreator->createFileWithCopyFrom( $desiredDestName, __DIR__ . '/File/' . 'LoremIpsum.json' ); return $dummyFileCreator; } @@ -37,8 +37,8 @@ public function newDummyJsonFile( $desiredDestName ) { */ public function newDummyTextFile( $desiredDestName ) { - $dummyFileCreator = new DummyFileCreator( $desiredDestName ); - $dummyFileCreator->createFileWithCopyFrom( __DIR__ . '/File/' . 'LoremIpsum.txt' ); + $dummyFileCreator = new DummyFileCreator(); + $dummyFileCreator->createFileWithCopyFrom( $desiredDestName, __DIR__ . '/File/' . 'LoremIpsum.txt' ); return $dummyFileCreator; } diff --git a/tests/phpunit/Utils/PageCreator.php b/tests/phpunit/Utils/PageCreator.php index 26a3e33618..98139620af 100644 --- a/tests/phpunit/Utils/PageCreator.php +++ b/tests/phpunit/Utils/PageCreator.php @@ -8,29 +8,18 @@ use UnexpectedValueException; /** - * - * @group SMW - * @group SMWExtension - * - * @licence GNU GPL v2+ + * @license GNU GPL v2+ * @since 1.9.1 + * + * @author mwjames */ class PageCreator { - /** - * @var TestEnvironment - */ - private $testEnvironment; - /** * @var null */ protected $page = null; - public function __construct() { - $this->testEnvironment = new TestEnvironment(); - } - /** * @since 1.9.1 * @@ -49,6 +38,10 @@ public function getPage() { /** * @since 1.9.1 * + * @param Title $title + * @param string $editContent + * @param string $pageContentLanguage + * * @return PageCreator */ public function createPage( Title $title, $editContent = '', $pageContentLanguage = '' ) { @@ -80,6 +73,9 @@ public function createPage( Title $title, $editContent = '', $pageContentLanguag /** * @since 1.9.1 * + * @param string $pageContent + * @param string $editMessage + * * @return PageCreator */ public function doEdit( $pageContent = '', $editMessage = '' ) { @@ -99,7 +95,7 @@ public function doEdit( $pageContent = '', $editMessage = '' ) { $this->getPage()->doEdit( $pageContent, $editMessage ); } - $this->testEnvironment->executePendingDeferredUpdates(); + TestEnvironment::executePendingDeferredUpdates(); return $this; } @@ -107,6 +103,9 @@ public function doEdit( $pageContent = '', $editMessage = '' ) { /** * @since 2.3 * + * @param Title $target + * @param boolean $isRedirect + * * @return PageCreator */ public function doMoveTo( Title $target, $isRedirect = true ) { @@ -118,19 +117,23 @@ public function doMoveTo( Title $target, $isRedirect = true ) { $isRedirect ); - $this->testEnvironment->executePendingDeferredUpdates(); + TestEnvironment::executePendingDeferredUpdates(); return $this; } /** * @since 2.0 + * + * @return EditInfo */ public function getEditInfo() { + $revision = $this->getPage()->getRevision(); + if ( class_exists( 'ContentHandler' ) ) { - $content = $this->getPage()->getRevision()->getContent(); + $content = $revision->getContent(); $format = $content->getContentHandler()->getDefaultFormat(); return $this->getPage()->prepareContentForEdit( @@ -141,11 +144,7 @@ public function getEditInfo() { ); } - if ( method_exists( $this->getPage()->getRevision(), 'getContent' ) ) { - $text = $this->getPage()->getRevision()->getContent( Revision::RAW ); - } else { - $text = $this->getPage()->getRevision()->getRawText(); - } + $text = method_exists( $revision, 'getContent' ) ? $revision->getContent( Revision::RAW ) : $revision->getRawText(); return $this->getPage()->prepareTextForEdit( $text, diff --git a/tests/phpunit/Utils/UtilityFactory.php b/tests/phpunit/Utils/UtilityFactory.php index 7a74bef993..a1b1182679 100644 --- a/tests/phpunit/Utils/UtilityFactory.php +++ b/tests/phpunit/Utils/UtilityFactory.php @@ -189,8 +189,8 @@ public function newLocalFileUploadWithCopy( $localUploadPath, $desiredDestName ) // Use to create a copy to avoid having the orginal file being // deleted after the upload - $dummyFileCreator = new DummyFileCreator( $desiredDestName ); - $dummyFileCreator->createFileWithCopyFrom( $localUploadPath ); + $dummyFileCreator = new DummyFileCreator(); + $dummyFileCreator->createFileWithCopyFrom( $desiredDestName, $localUploadPath ); return new LocalFileUpload( $dummyFileCreator->getPath(), @@ -198,4 +198,20 @@ public function newLocalFileUploadWithCopy( $localUploadPath, $desiredDestName ) ); } + /** + * @since 2.5 + * + * @return LocalFileUpload + */ + public function newLocalFileUpload() { + + $localFileUpload = new LocalFileUpload(); + + $localFileUpload->setDummyFileCreator( + new DummyFileCreator() + ); + + return $localFileUpload; + } + }