@@ -3,19 +3,15 @@ Contributing
33
44First of all, ** thank you** for contributing, ** you are awesome** !
55
6- Here are a few rules to follow in order to ease code reviews, and discussions before
7- maintainers accept and merge your work.
6+ Here are a few rules to follow in order to ease code reviews, and discussions
7+ before maintainers accept and merge your work:
88
9- You MUST follow the [ PSR-1] ( http://www.php-fig.org/psr/1/ ) and
10- [ PSR-2] ( http://www.php-fig.org/psr/2/ ) . If you don't know about any of them, you
11- should really read the recommendations. Can't wait? Use the [ PHP-CS-Fixer
12- tool] ( http://cs.sensiolabs.org/ ) .
13-
14- You MUST run the test suite.
15-
16- You MUST write (or update) unit tests.
17-
18- You SHOULD write documentation.
9+ * You MUST follow the [ PSR-1] ( http://www.php-fig.org/psr/1/ ) and
10+ [ PSR-2] ( http://www.php-fig.org/psr/2/ ) recommendations. Use the [ PHP-CS-Fixer
11+ tool] ( http://cs.sensiolabs.org/ ) to fix the syntax of your code automatically.
12+ * You MUST run the test suite.
13+ * You MUST write (or update) unit tests.
14+ * You SHOULD write documentation.
1915
2016Please, write [ commit messages that make
2117sense] ( http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ) ,
@@ -31,3 +27,52 @@ Also, while creating your Pull Request on GitHub, you MUST write a description
3127which gives the context and/or explains why you are creating it.
3228
3329Thank you!
30+
31+ Running tests
32+ -------------
33+
34+ Before running the test suite, execute the following Composer command to install
35+ the dependencies used by the bundle:
36+
37+ ``` bash
38+ $ composer install --dev
39+ ```
40+
41+ Then, execute the tests executing:
42+
43+ ``` bash
44+ $ phpunit
45+ ```
46+
47+ ### JavaScript Test Suite
48+
49+ First, install [ PhantomJS] ( http://phantomjs.org/ ) and then, execute this command:
50+
51+ ``` bash
52+ $ phantomjs Resources/js/run_jsunit.js Resources/js/router_test.html
53+ ```
54+
55+ Compiling the JavaScript files
56+ ------------------------------
57+
58+ > ** NOTE**
59+ >
60+ > We already provide a compiled version of the JavaScript; this section is only
61+ > relevant if you want to make changes to this script.
62+
63+ In order to re-compile the JavaScript source files that we ship with this
64+ bundle, you need the Google Closure Tools. You need the
65+ [ plovr] ( http://plovr.com/download.html ) tool, which is a Java ARchive, so you
66+ also need a working Java environment. You can re-compile the JavaScript with the
67+ following command:
68+
69+ ``` bash
70+ $ java -jar plovr.jar build Resources/config/plovr/compile.js
71+ ```
72+
73+ Alternatively, you can use the JMSGoogleClosureBundle. If you install this
74+ bundle, you can re-compile the JavaScript with the following command:
75+
76+ ``` bash
77+ $ php app/console plovr:build @FOSJsRoutingBundle/compile.js
78+ ```
0 commit comments