Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 054cae0

Browse files
committed
Merge pull request #278 from OndraM/contribution-guidelines
Contribution guidelines
2 parents 3bc3409 + ebed69f commit 054cae0

File tree

4 files changed

+53
-31
lines changed

4 files changed

+53
-31
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ This project versioning adheres to [Semantic Versioning](http://semver.org/).
33

44
## Unreleased
55
- Added CHANGELOG.md
6+
- Added CONTRIBUTING.md with information and rules for contributors
67

78
## 1.1.1 - 2015-12-31
89
- Fixed strict standards error in `ChromeDriver`

CONTRIBUTING.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Contributing to php-webdriver
2+
3+
We love to have your help to make php-webdriver better!
4+
5+
Feel free to open an [issue](https://github.com/facebook/php-webdriver/issues) if you run into any problem, or
6+
send a pull request (see bellow) with your contribution.
7+
8+
## Workflow when contributing a patch
9+
10+
1. Fork the project on GitHub
11+
2. Implement your code changes into separate branch
12+
3. Make sure all PHPUnit tests passes (see below). We also have Travis CI build which will automatically run tests on your pull request).
13+
4. When implementing notable change, fix or a new feature, add record to Unreleased section of [CHANGELOG.md](CHANGELOG.md)
14+
5. Submit your [pull request](https://github.com/facebook/php-webdriver/pulls) against community branch
15+
16+
Note before any pull request can be accepted, a [Contributors Licensing Agreement](http://developers.facebook.com/opensource/cla) must be signed.
17+
18+
When you are going to contribute, please keep in mind that this webdriver client aims to be as close as possible to other languages Java/Ruby/Python/C#.
19+
FYI, here is the overview of [the official Java API](http://selenium.googlecode.com/svn/trunk/docs/api/java/index.html?overview-summary.html)
20+
21+
### Run unit tests
22+
23+
There are two test-suites: one with unit tests only, second with functional tests, which require running selenium server.
24+
25+
To execute all tests simply run:
26+
27+
./vendor/bin/phpunit
28+
29+
If you want to execute just the unit tests, run:
30+
31+
./vendor/bin/phpunit --testsuite unit
32+
33+
For the functional tests you must first download and start the selenium server, then run the `functional` test suite:
34+
35+
java -jar selenium-server-standalone-2.48.2.jar -log selenium.log &
36+
./vendor/bin/phpunit --testsuite functional

README.md

+12-27
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,16 @@ Then install the library:
3030

3131
All you need as the server for this client is the `selenium-server-standalone-#.jar` file provided here: http://selenium-release.storage.googleapis.com/index.html
3232

33-
* Download and run that file, replacing # with the current server version.
33+
Download and run that file, replacing # with the current server version.
3434

35-
```
3635
java -jar selenium-server-standalone-#.jar
37-
```
3836

3937
Then when you create a session, be sure to pass the url to where your server is running.
4038

41-
```php
42-
// This would be the url of the host running the server-standalone.jar
43-
$host = 'http://localhost:4444/wd/hub'; // this is the default
44-
```
39+
```php
40+
// This would be the url of the host running the server-standalone.jar
41+
$host = 'http://localhost:4444/wd/hub'; // this is the default
42+
```
4543

4644
* Launch Firefox:
4745

@@ -57,11 +55,11 @@ Then when you create a session, be sure to pass the url to where your server is
5755

5856
You can also customize the desired capabilities:
5957

60-
```php
61-
$desired_capabilities = DesiredCapabilities::firefox();
62-
$desired_capabilities->setCapability('acceptSslCerts', false);
63-
$driver = RemoteWebDriver::create($host, $desired_capabilities);
64-
```
58+
```php
59+
$desired_capabilities = DesiredCapabilities::firefox();
60+
$desired_capabilities->setCapability('acceptSslCerts', false);
61+
$driver = RemoteWebDriver::create($host, $desired_capabilities);
62+
```
6563

6664
* See https://code.google.com/p/selenium/wiki/DesiredCapabilities for more details.
6765

@@ -92,18 +90,5 @@ If you're reading this you've already found our Github repository. If you have a
9290

9391
## Contributing
9492

95-
We love to have your help to make php-webdriver better. Feel free to
96-
97-
* open an [issue](https://github.com/facebook/php-webdriver/issues) if you run into any problem.
98-
* fork the project and submit [pull request](https://github.com/facebook/php-webdriver/pulls). Before the pull requests can be accepted, a [Contributors Licensing Agreement](http://developers.facebook.com/opensource/cla) must be signed.
99-
100-
When you are going to contribute, please keep in mind that this webdriver client aims to be as close as possible to other languages Java/Ruby/Python/C#.
101-
FYI, here is the overview of [the official Java API](http://selenium.googlecode.com/svn/trunk/docs/api/java/index.html?overview-summary.html)
102-
103-
### Run unit tests
104-
105-
To run unit tests simply run:
106-
107-
./vendor/bin/phpunit -c ./tests
108-
109-
Note: For the functional test suite, a running selenium server is required.
93+
We love to have your help to make php-webdriver better. See [CONTRIBUTING.md](CONTRIBUTING.md) for more information
94+
about contributing and developing php-webdriver.

phpunit.xml.dist

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
bootstrap="tests/bootstrap.php"
1616
>
1717

18-
<testsuites>
19-
<testsuite name="Unit-Testsuite">
18+
<testsuites>
19+
<testsuite name="unit">
2020
<directory>tests/unit</directory>
2121
</testsuite>
22-
<testsuite name="Functional-Testsuite">
23-
<directory>tests/functional/</directory>
22+
<testsuite name="functional">
23+
<directory>tests/functional</directory>
2424
</testsuite>
2525
</testsuites>
2626
</phpunit>

0 commit comments

Comments
 (0)