Skip to content
This repository was archived by the owner on Feb 1, 2019. It is now read-only.

Files

Latest commit

 

History

History
26 lines (17 loc) · 694 Bytes

TestExamples.md

File metadata and controls

26 lines (17 loc) · 694 Bytes

Test Examples

Included with safer-php is saferclient.php and TestRunner.php and a demo-htdocs htdocs root. To run a TestRunner.php demo try the following from two Bash shells.

From the first shell run

    php -S localhost:8000 -t demo-htdocs

From the second run

    export TEST_URL="http://localhost:8000/#.php"
    export TEST_USERNAME="jane.doe"
    export TEST_SECRET="some-mighty-secret-thingy"
    php TestRunner.php example_testing

This should run the tests and output results successfully. Then try kill the php webserver in the first shell and re-run php TestRunner.php example_testing from the second. What do you see that changed?