Skip to content

Commit

Permalink
Removing submodules and switching to Composer for dependency management
Browse files Browse the repository at this point in the history
  • Loading branch information
giorgiosironi committed Mar 2, 2013
1 parent 57ca002 commit 94776f9
Show file tree
Hide file tree
Showing 18 changed files with 441 additions and 111 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ build/coverage
build/logs
build/pdepend
phpunit.xml
vendor/*
composer.phar
selenium-server-*.jar
Tests/Selenium2TestCase/Coverage/*.dummyTestId
*.php~
30 changes: 0 additions & 30 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ php:
- 5.3
- 5.4
before_script: ./before_script.sh
script: "php run-phpunit.php --filter testOpen Tests/Selenium2TestCaseTest.php"
script: "vendor/bin/phpunit --filter testOpen Tests/Selenium2TestCaseTest.php"
23 changes: 17 additions & 6 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,26 @@ Please direct *pull requests* to giorgiosironi/phpunit-selenium for automated te

= Running the test suite =
To run the test suite for this package, you should serve selenium-1-tests via HTTP:
```
selenium-1-tests/ $ python -m SimpleHTTPServer 8080
```
and configure the constant that you will be asked for accordingly if you do not run the server on localhost:8080.
You also need to run a Selenium Server (the only supported version is 2.23, at this time the most recent).
You also need to run a Selenium Server:
```
$ java -jar java -jar selenium-server-standalone-2.x.xjar
```
or with xvfb:
```
$ sudo xvfb-run java -jar bin/selenium-server-standalone-2.x.x.jar
Dependencies are managed via git submodules, so you must execute these commands once you have a clean working copy:
$ git submodule init
$ git submodule update
```
Take a look at `before_script.sh` for an automated way to setup the HTTP and Selenium servers.

Dependencies are managed via Composer, so you must grab them like this:
```
$ composer install --dev
```
The tests can then be run with:
$ php run-phpunit.php
You can copy phpunit.xml.dist to phpunit.xml and setup a custom configuration for browsers, but the test suite is based on Firefox.
```
$ vendor/bin/phpunit Tests
```
You can copy phpunit.xml.dist to phpunit.xml and setup a custom configuration for browsers, but the test suite is based on Firefox on an Ubuntu machine.
11 changes: 2 additions & 9 deletions before_script.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
echo "Submodules of phpunit-selenium"
git submodule init
git submodule update
echo "Getting composer"
curl -O http://getcomposer.org/composer.phar
echo "PHPUnit 3.7 is used"
cd vendor/phpunit
git checkout 3.7
git pull --ff-only origin 3.7
../../composer.phar install --dev
cd -
echo "Dependencies"
composer.phar install --dev
echo "Starting Python HTTP server"
cd selenium-1-tests
python -m SimpleHTTPServer 8080 > /dev/null 2>&1 &
Expand Down
Loading

0 comments on commit 94776f9

Please sign in to comment.