wiki.techinc.nl/tests/phpunit/data/dumps
daniel 5a58e4421c Make dump tests based on fixture files.
This adds test coverage for dumping non-main slots.

NOTE: This invents a syntax for XML file "templates" that are
expected to "match" the actual output file.

Bug: T240213
Change-Id: I05e46175809c4562f3530377fe37db911bee244a
2020-04-06 15:21:00 -07:00
..
AllStubs.0.10.xml
AllStubs.0.11.xml
AllText.0.10.xml
AllText.0.11.xml
CurrentArticleStubs.0.10.xml
CurrentArticleStubs.0.11.xml
CurrentStubs.0.10.xml
CurrentStubs.0.11.xml
README.md
SiteInfo.0.10.xml
SiteInfo.0.11.xml

This directory contains data files for testing XML dumps. Each file contains an XML structure, full or partial. These data files are intended to be used with DumpAsserter::assertDOM().

The data files contain XML with variable placeholders using a mustache-like syntax, e.g. {{site_name}}. The variable placeholder syntax is implemented by DumpAsserter::resolveVars(), variable values can be defined using DumpAsserter::setVarMapping(). Any differences in whitespace and any comments in the XML files are ignored.

Data files may make use of the test:data and test:end/ tags: test:data acts as a wrapper for a sequence of elements and is ignored during comparison. test:end/ terminates the comparison, and causes all subsequent content of the file to be ignored. The behavior of the test:data and test:end/ tags is controlled by DumpAsserter::assertDOM().

The names of these files, the data they contain, as well as the names of the variables used, are determined by the PageDumpTestDataTrait, which is a trait used by some of the subclasses of DumpTestCase.