https://github.com/concretecms/prb_lint_tests
Public tests for the concrete5.org marketplace testing add-on.
https://github.com/concretecms/prb_lint_tests
Last synced: about 1 year ago
JSON representation
Public tests for the concrete5.org marketplace testing add-on.
- Host: GitHub
- URL: https://github.com/concretecms/prb_lint_tests
- Owner: concretecms
- Created: 2014-05-27T17:10:28.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2015-04-22T17:16:10.000Z (over 11 years ago)
- Last Synced: 2023-03-12T05:19:10.100Z (over 3 years ago)
- Language: PHP
- Size: 1.09 MB
- Stars: 6
- Watchers: 7
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Automated Marketplace Tests
This repository holds some tests to be used as examples to writing your own tests. We at concrete5 have made this repository so that we can open up our linting process to whoever can help.
Please write your class either in a way that it handles any php file, or for a subset of php files which should describe in your pull request / code comments.
### Setup
In order to get started, you'll need to run initialize the bundled vagrant, install the composer dependencies, and build [xhpast](https://github.com/facebook/libphutil/tree/master/support/xhpast).
Likely, these commands are:
$ vagrant up;
$ vagrant ssh;
$ cd /var/www;
$ composer install;
$ sh /var/www/support/libphutil/scripts/build_xhpast.sh
### Running Tests
To run the tests, just run `php /var/www/run_test.php`
### Writing Tests
The sample test engine grabs all tests from the `src/tests/` directory, and instantiates them following PSR-4's class definition.
In order to add a test, simply create the file and extend the `\PRB\Linter\Test` class.
Tests can be given whatever input they need, just describe your input in your pull request and comment your class well. The actual implementation into the linter itself will be done by me at my discretion.
I ask that you follow PSR-2 in providing new tests, and that you comment your class well so that I, and others to come, can understand it quickly and more wholly.