Skip to content

Jadoube-Initiative/phpPGN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phpPGN

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/)

Development Environment

Install PHP (Example: command line Ubuntu installation)

$ 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.

see PHPUnit Instructions

###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)

  1. IDE Configuration (example Netbeans)
  2. Access menu Tools -> Options -> PHP
  3. Click on Search or set manually via Choose
  4. Right click on Project -> Properties -> Mark PHPUnit
  5. Setup phpunit binary
  6. Setup phpunit-skelgen binary
  7. Setup PHPUnit bootstrap configuration
  8. Right click on Project -> Properties -> PHPUnit
  9. Use Bootstrap and Use Bootstrap to create new unit tests,
  10. In the same screen, choose bootstrap.php file

Testing (Example: via command line)

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)

About

Set of PHP code to deal with PGN (Portable Game Notation) files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published