Skip to content

Commit

Permalink
Composer: add scripts for tests and apidoc generation
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlaltca committed Dec 7, 2017
1 parent d11df02 commit d248448
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -19,7 +19,7 @@ before_script:
- psql -a -w prado_unitest -f ./tests/initdb_pgsql.sql

script:
- php ./vendor/bin/phpunit --testsuite unit
- composer unittest

after_script:
- php ./bin/coveralls -v
11 changes: 7 additions & 4 deletions README.md
Expand Up @@ -92,16 +92,19 @@ Starting point:

Prado uses phpunit (https://phpunit.de/) for unit testing and Selenium (http://www.seleniumhq.org/) for functional testing.
A phpunit configuration file is providen, to run the tests just execute
```./vendor/bin/phpunit --testsuite unit``` to run unit tests and
```./vendor/bin/phpunit --testsuite functional``` to run functional tests.

```composer unittest``` to run unit tests and
```composer functionaltest``` to run functional tests.

Test results will be saved in in the `build/tests/` directory.

## API Documentation
The complete API documentation can be found at http://pradosoft.github.io/docs/manual/

Prado uses its own fork of ApiGen (http://www.apigen.org) to generate its API documentation.
Prado uses its own fork of ApiGen 4 (http://www.apigen.org) to generate its API documentation.
An ApiGen configuration file is providen, to generate the documentation just execute
```./vendor/bin/apigen generate --config=.apigen.yaml```

```composer gendoc```

The documentation will be generated in the `build/docs/` directory.

5 changes: 5 additions & 0 deletions composer.json
Expand Up @@ -102,6 +102,11 @@
"source" : "https://github.com/pradosoft/prado",
"docs" : "http://www.pradoframework.net/site/documentation"
},
"scripts": {
"gendoc": "apigen generate --config=.apigen.yaml",
"unittest": "phpunit --testsuite unit",
"functionaltest": "phpunit --testsuite functional"
},
"bin" : [
"bin/prado-cli"
]
Expand Down
115 changes: 60 additions & 55 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d248448

Please sign in to comment.