From 9f745505cea657cf632f95e30ad41c243e15f293 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 9 Jul 2013 10:43:19 +0200 Subject: [PATCH 01/17] Adjust php testrunner so that a html coverage report is generated Remove the --coverage-clover argument as the jenkins plugin cannot properly read it and added --coverage-html instead. refs #4313 --- test/php/runtests | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/php/runtests b/test/php/runtests index 680c96179..e63ed897c 100755 --- a/test/php/runtests +++ b/test/php/runtests @@ -108,9 +108,9 @@ def main(): command_options.append('--log-junit') command_options.append(os.path.join(report_directory, 'phpunit_results.xml')) - command_options.append('--coverage-clover') + command_options.append('--coverage-html') command_options.append(os.path.join(report_directory, - 'phpunit_coverage.xml')) + 'php_html_coverage')) if options.include: command_options.append('--filter') command_options.append(options.include) From 5e39e7ebeb5eedfea04c965f420a6e4869cf4539 Mon Sep 17 00:00:00 2001 From: Marius Hein Date: Tue, 9 Jul 2013 10:31:36 +0200 Subject: [PATCH 02/17] Add phpDocumentator to project Create configuration to create api doc with cli. refs #4085 --- .gitignore | 3 +++ doc/apidoc_creation.md | 24 ++++++++++++++++++++++++ doc/phpdoc.xml | 22 ++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 doc/apidoc_creation.md create mode 100644 doc/phpdoc.xml diff --git a/.gitignore b/.gitignore index 05ae14b2a..f3c1a22a7 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,6 @@ test/php/bin/extcmd_test # misc test output test/frontend/static/public + +# Generated API documentation +doc/api diff --git a/doc/apidoc_creation.md b/doc/apidoc_creation.md new file mode 100644 index 000000000..c822dad82 --- /dev/null +++ b/doc/apidoc_creation.md @@ -0,0 +1,24 @@ +# Create API documentation + +## Prerequisites + +You need phpDocumentor 2 installed on your system to create the api +documentation. Please visit [phpdoc's website](http://phpdoc.org/) for more +information. + +## Configuration + +phpDocumentator is configured with xml configuration reside in doc/phpdoc.xml. +In there you'll find the target path where the documentation is created as +html. Default location is doc/api/. Just point to index.html in this directory +with a browser. + +If you generated the documentation already, you can follow [this link](apidoc/idnex.html). + +## Generation + +Change to Icinga 2 Web root directory (source tree) and run: + +``` +phpdoc -c doc/phpdoc.xml +``` diff --git a/doc/phpdoc.xml b/doc/phpdoc.xml new file mode 100644 index 000000000..1c91f547b --- /dev/null +++ b/doc/phpdoc.xml @@ -0,0 +1,22 @@ + + + Icinga 2 Web + + ./api + php + + public,private,protected + + ./api + + + quiet + + +