A PHP written Library to deal with PGN (Portable Game Notation) files. It is currently designed to understand PGN files only for reading purposes, there is no intention yet to validate the files, it assumes the PGN file is correct (e.g., generated from other tools like ChassPad). Validating PGN files can be a future work. phpPGN releases follow the Semantic Versioning Standard (http://semver.org/)
$ sudo apt-get install php5 php5-fpm php5-sqlite
###Install PHPUnit:
$ wget https://phar.phpunit.de/phpunit.phar
$ chmod +x phpunit.phar
$ sudo mv phpunit.phar /usr/local/bin/phpunit
$ phpunit --version
PHPUnit x.y.z by Sebastian Bergmann and contributors.
###Install PHPUnit_SkeletonGenerator
$ wget https://phar.phpunit.de/phpunit-skelgen.phar
$ chmod +x phpunit-skelgen.phar
$ sudo mv phpunit-skelgen.phar /usr/local/bin/phpunit-skelgen
$ phpunit-skelgen --version
phpunit-skelgen x.y.z by Sebastian Bergmann.
see PHPUnit_SkeletonGenerator Instructions
###IDE Configuration (Example: Netbeans)
- IDE Configuration (example Netbeans)
- Access menu Tools -> Options -> PHP
- Click on Search or set manually via Choose
- Right click on Project -> Properties -> Mark PHPUnit
- Setup phpunit binary
- Setup phpunit-skelgen binary
- Setup PHPUnit bootstrap configuration
- Right click on Project -> Properties -> PHPUnit
- Use Bootstrap and Use Bootstrap to create new unit tests,
- In the same screen, choose
bootstrap.php
file
In order to check if all configurations succeeded you may want to run the unit tests by executing the following command in the project directory (e.g.: /home/user/projects/phpPGN
):
$ cd /home/user/projects/phpPGN
$ phpunit test --bootstrap="bootstrap.php"
...big output ending with something like:
.... X / X (100%)
Time: Y ms, Memory: W Mb
OK (X tests, Z assertions)