-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- adapted README.md to install and use with Composer from fit-skeleton,
extracting doc/ConfigManually.md - lowered PHP version requirement - added script/run-cli.php for running from the command line - adapted script/config_shelf.php to support run-cli.php
- Loading branch information
1 parent
f2de019
commit 5966ccd
Showing
5 changed files
with
169 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
TO INSTALL AND RUN EXAMPLES | ||
=========================== | ||
|
||
1. You need a http server with PHP 5.1 or higher. For security reasons it should only be accessable | ||
to you and those who need to run tests. | ||
|
||
2. Download or fetch PhpFit from https://github.com/metaclass-nl/phpfit | ||
|
||
3. Extract and/or upload the PhpFit files and folders into a folder on your http server | ||
|
||
4. Download or fetch Fit Shelf from https://github.com/metaclass-nl/fit-shelf | ||
|
||
5. Extract and/or upload the shelf subfolder from the fit_shelf folder to a folder on your http server | ||
|
||
6. Edit the conf_shelf.php file in the script folder you copied in step 4 and correct the include paths | ||
with respect to the locations of phpfit and the shelf folder on your server. | ||
|
||
7. If necessary make the folder in which phpFits output file $output is situated | ||
writable for the run-web.php script. | ||
|
||
8. Enter the url on your http server to index.html from the script/book folder in your browser | ||
|
||
9. You should see some hyperlinks to some tests from the book. Click one that is not under development. | ||
|
||
|
||
TO RUN YOUR OWN TESTS | ||
===================== | ||
|
||
1. Make your own fixtures folder (may be outside of the fit shelf folder) | ||
and set $fixturesDir in conf_shelf.php to point to it. | ||
|
||
2. Upload you own Fixture file to your fixtures folder | ||
|
||
3. Make your own tests folder (may be outside of the fit shelf folder) | ||
|
||
4. Upload your own test to your tests folder | ||
|
||
5. Enter the url in your browser to run-web.php?input_filename= folowed by the relative | ||
path from run-web.php to your test | ||
|
||
6. You should see your own test results in your browser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
//usage: php run-cli.php vendor/metaclass-nl/fit-shelf/script/book/tests/Fig1TestDisconnect.html | ||
require_once 'conf_shelf.php'; | ||
|
||
require_once 'PHPFIT.php'; | ||
require_once 'PHPFIT/FixtureLoader.php'; | ||
PHPFIT_FixtureLoader::setFixturesDirectory($fixturesDir); | ||
|
||
$output = isset($argv[2]) ? $argv[2] : 'output.html'; | ||
|
||
if (isset($argv[3])) { | ||
$fixturesDir = $argv[3]; | ||
} | ||
|
||
if( count( $argv ) < 2 ) { | ||
fwrite( STDERR, "Invalid number of arguments!!!\nUsage: phpfit path/to/input.html [path/to/output.html] [paths/to/fixtures]\n" ); | ||
return 1; | ||
} | ||
|
||
echo PHPFIT::run($argv[1], $output) . "\n"; | ||
|
||
?> |