Skip to content

niklaka/ProcessWireTests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ProcessWire Tests

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.

Setting up the environment

Prerequisites

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:

ProcessWire installation

See SkyscrapersProfile for instructions on installing ProcessWire with that profile.

The Test Suite

Clone ProcessWireTests under clean PW + Skyscrapres installation, for eaxample into a directory tests.

Running the tests

If the environment is properly set up, running the tests is as simple as:

phpunit tests

Copyright (c) 2013 Niklas Lakanen

About

Test suite for ProcessWire core (work in progress)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages