This aims to be a test suite for ProcessWire core, especially for the selector engine. Tests are built using PHPUnit and are meant to be run against a clean installation of bleeding edge ProcessWire (dev branch that is) with SkyscraperProfile.
The idea is to run the same selectors against both database and an in-memory PageArray consisting of all pages retrieved from the database. Both ways we should end up with the same set of data, thus same assertions should hold true. This aims making and keeping the API variants consistent (db and in-memory) - and of course free of bugs.
Current version runs some tests with simple selectors and different kinds of operators. Later on there will (hopefully) be code coverage metrics included as well as a whole lot more tests.
In addition to requirements of ProcessWire itself, the tests need a working installation of PHPUnit. To install PEAR and PHPUnit on a Mac these resources have been found useful:
See SkyscrapersProfile for instructions on installing ProcessWire with that profile.
Clone ProcessWireTests under clean PW + Skyscrapres installation, for eaxample into a directory tests.
If the environment is properly set up, running the tests is as simple as:
phpunit tests
Copyright (c) 2013 Niklas Lakanen