Permalink
Browse files

Merge branch 'release/1.3.0'

  • Loading branch information...
2 parents 5ece94b + 0a1fffe commit 164b2f6e3d4396d1d2b6c22316eb6716d56d6231 @everzet everzet committed Dec 21, 2011
Showing with 1,967 additions and 765 deletions.
  1. +2 −0 .gitignore
  2. +0 −27 .gitmodules
  3. +15 −0 .travis.yml
  4. +10 −0 CHANGES.md
  5. +50 −0 README.md
  6. +0 −26 autoload.php.dist
  7. +7 −0 bin/install_deps
  8. +8 −0 bin/install_sahi
  9. +16 −0 bin/install_selenium
  10. +3 −0 bin/kill_sahi
  11. +3 −0 bin/kill_selenium
  12. +4 −1 bin/release
  13. +11 −0 bin/run_all_tests
  14. +7 −0 bin/start_sahi
  15. +7 −0 bin/start_selenium
  16. +197 −0 composer.json
  17. +1 −5 features/bootstrap/FeatureContext.php
  18. +1 −1 phpunit.xml.dist
  19. +3 −3 src/Behat/Mink/Behat/Context/BaseMinkContext.php
  20. +37 −7 src/Behat/Mink/Behat/Context/MinkContext.php
  21. +39 −27 src/Behat/Mink/Behat/Context/translations/es.xliff
  22. +62 −18 src/Behat/Mink/Behat/Context/translations/fr.xliff
  23. +0 −261 src/Behat/Mink/ClassLoader/UniversalClassLoader.php
  24. +10 −88 src/Behat/Mink/Compiler/MapFileCompiler.php
  25. +44 −53 src/Behat/Mink/Compiler/PearCompiler.php
  26. +49 −71 src/Behat/Mink/Compiler/PharCompiler.php
  27. +96 −71 src/Behat/Mink/Driver/GoutteDriver.php
  28. +55 −27 src/Behat/Mink/Driver/SahiDriver.php
  29. +67 −0 src/Behat/Mink/Driver/Selenium2/syn.js
  30. +832 −0 src/Behat/Mink/Driver/Selenium2Driver.php
  31. +25 −10 src/Behat/Mink/Driver/SeleniumDriver.php
  32. +12 −10 src/Behat/Mink/Driver/Zombie/Server.php
  33. +20 −7 src/Behat/Mink/Driver/ZombieDriver.php
  34. +2 −2 src/Behat/Mink/Element/TraversableElement.php
  35. +25 −5 src/Behat/Mink/PHPUnit/TestCase.php
  36. +1 −1 src/Behat/Mink/Session.php
  37. +77 −13 tests/Behat/Mink/Driver/GeneralDriverTest.php
  38. +13 −0 tests/Behat/Mink/Driver/JavascriptDriverTest.php
  39. +11 −0 tests/Behat/Mink/Driver/SahiDriverTest.php
  40. +36 −0 tests/Behat/Mink/Driver/Selenium2DriverTest.php
  41. +11 −0 tests/Behat/Mink/Driver/SeleniumDriverTest.php
  42. +5 −0 tests/Behat/Mink/Driver/ZombieDriverTest.php
  43. +2 −7 tests/Behat/Mink/Driver/web-fixtures/advanced_form.php
  44. +17 −0 tests/Behat/Mink/Driver/web-fixtures/issue131.php
  45. 0 tests/Behat/Mink/Driver/web-fixtures/js/jquery-ui-1.8.14.custom.min.js
  46. +24 −0 tests/Behat/Mink/Driver/web-fixtures/js_test.php
  47. +26 −0 tests/Behat/Mink/Driver/web-fixtures/multiselect_form.php
  48. +3 −0 tests/Behat/Mink/Element/DocumentElementTest.php
  49. +3 −0 tests/Behat/Mink/Element/ElementTest.php
  50. +3 −0 tests/Behat/Mink/Element/NodeElementTest.php
  51. +3 −0 tests/Behat/Mink/MinkTest.php
  52. +3 −0 tests/Behat/Mink/Selector/CssSelectorTest.php
  53. +3 −0 tests/Behat/Mink/Selector/NamedSelectorTest.php
  54. +3 −0 tests/Behat/Mink/Selector/SelectorsHandlerTest.php
  55. +3 −0 tests/Behat/Mink/SessionTest.php
  56. +0 −15 tests/bootstrap.php
  57. +0 −1 vendor/Buzz
  58. +0 −1 vendor/Goutte
  59. +0 −1 vendor/SahiClient
  60. +0 −1 vendor/Symfony/Component/BrowserKit
  61. +0 −1 vendor/Symfony/Component/CssSelector
  62. +0 −1 vendor/Symfony/Component/DomCrawler
  63. +0 −1 vendor/Symfony/Component/Finder
  64. +0 −1 vendor/Symfony/Component/Process
  65. +0 −1 vendor/php-selenium
View
@@ -1,3 +1,5 @@
*.tgz
*.phar
phpunit.xml
+composer.lock
+vendor
View
@@ -1,27 +0,0 @@
-[submodule "vendor/Goutte"]
- path = vendor/Goutte
- url = git://github.com/fabpot/Goutte.git
-[submodule "vendor/Symfony/Component/CssSelector"]
- path = vendor/Symfony/Component/CssSelector
- url = git://github.com/symfony/CssSelector.git
-[submodule "vendor/SahiClient"]
- path = vendor/SahiClient
- url = git://github.com/Behat/SahiClient.git
-[submodule "vendor/Buzz"]
- path = vendor/Buzz
- url = git://github.com/kriswallsmith/Buzz.git
-[submodule "vendor/Symfony/Component/Finder"]
- path = vendor/Symfony/Component/Finder
- url = git://github.com/symfony/Finder
-[submodule "vendor/Symfony/Component/BrowserKit"]
- path = vendor/Symfony/Component/BrowserKit
- url = git://github.com/symfony/BrowserKit.git
-[submodule "vendor/Symfony/Component/Process"]
- path = vendor/Symfony/Component/Process
- url = git://github.com/symfony/Process.git
-[submodule "vendor/Symfony/Component/DomCrawler"]
- path = vendor/Symfony/Component/DomCrawler
- url = git://github.com/symfony/DomCrawler.git
-[submodule "vendor/php-selenium"]
- path = vendor/php-selenium
- url = https://github.com/alexandresalome/PHP-Selenium
View
@@ -0,0 +1,15 @@
+language: php
+
+php:
+ - 5.3
+ - 5.4
+
+branches:
+ only:
+ - master
+ - develop
+
+before_script:
+ - bin/install_deps
+
+script: phpunit --group unittest
View
@@ -1,3 +1,13 @@
+1.3.0 / 2011-12-21
+==================
+
+ * Brand new Selenium2Driver (webdriver session)
+ * Multiselect bugfixes
+ * ZombieDriver back in the business
+ * Composer now manages dependencies
+ * Some MinkContext steps got fixes
+ * Lots of bug fixes and cleanup
+
1.2.0 / 2011-11-04
==================
View
@@ -1,6 +1,8 @@
Mink
====
+[![Build Status](https://secure.travis-ci.org/Behat/Mink.png)](http://travis-ci.org/Behat/Mink)
+
* The main website with documentation is at
[http://mink.behat.org](http://mink.behat.org)
* Official user group is at [Google Groups](http://groups.google.com/group/behat)
@@ -46,6 +48,52 @@ $mink->getSession('goutte1')->getPage()->findLink('Chat')->click();
$mink->getSession('goutte2')->getPage()->findLink('Chat')->click();
```
+Install Dependencies
+--------------------
+
+ wget http://getcomposer.org/composer.phar
+ php composer.phar install
+
+How to run Mink test suite
+--------------------------
+
+1. Install dependencies (including Sahi and Selenium)
+
+ ``` bash
+ bin/install_deps
+ bin/install_sahi
+ bin/install_selenium
+ ```
+
+2. To run all tests - call `bin/run_all_tests`
+
+If you want to run specific driver tests, use appropriate PHPUnit group
+and make sure that `Sahi`/`Selenium` is runned if you want to test
+one of them:
+
+``` bash
+bin/start_sahi
+phpunit --group sahidriver
+bin/kill_sahi
+```
+
+``` bash
+bin/start_selenium
+phpunit --group seleniumdriver
+bin/kill_selenium
+```
+
+`Zombie` and `Goutte` driver tests doesn't require some specific proxy
+to be runned and could be tested as is:
+
+``` bash
+phpunit --group zombiedriver
+```
+
+``` bash
+phpunit --group gouttedriver
+```
+
Translated languages
--------------------
@@ -72,6 +120,8 @@ Contributors
* Konstantin Kudryashov [everzet](http://github.com/everzet) [lead developer]
* Pascal Cremer [b00giZm](http://github.com/b00giZm) [ZombieDriver creator]
+* Alexandre Salomé [alexandresalome](http://github.com/alexandresalome) [SeleniumDriver creator]
+* Pete Otaqui [pete-otaqui](http://github.com/pete-otaqui) [Selenium2Driver creator]
Sponsors
--------
View
@@ -1,26 +0,0 @@
-<?php
-
-/*
- * This file is part of the Behat\Mink.
- * (c) Konstantin Kudryashov <ever.zet@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (!class_exists('Behat\Mink\ClassLoader\UniversalClassLoader')) {
- require_once __DIR__ . '/src/Behat/Mink/ClassLoader/UniversalClassLoader.php';
-}
-use Behat\Mink\ClassLoader\UniversalClassLoader;
-
-$loader = new UniversalClassLoader();
-$loader->registerNamespaces(array(
- 'Behat\Mink' => __DIR__ . '/src',
- 'Behat\SahiClient' => __DIR__ . '/vendor/SahiClient/src',
- 'Symfony\Component' => __DIR__ . '/vendor',
- 'Buzz' => __DIR__ . '/vendor/Buzz/lib',
- 'Goutte' => __DIR__ . '/vendor/Goutte/src',
- 'Zend' => __DIR__ . '/vendor/Goutte/vendor/zend/library',
- 'Selenium' => __DIR__ . '/vendor/php-selenium/src',
-));
-$loader->register();
View
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+BASEDIR=$(dirname $0)
+cd $BASEDIR/..
+
+wget -nc http://getcomposer.org/composer.phar
+php composer.phar install
View
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+BASEDIR=$(dirname $0)
+cd $BASEDIR/../vendor
+
+wget http://downloads.sourceforge.net/project/sahi/sahi-v35/20110719/sahi_20110719.zip -O sahi.zip
+unzip sahi.zip
+rm sahi.zip
View
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+BASEDIR=$(dirname $0)
+cd $BASEDIR/../vendor
+
+wget http://selenium.googlecode.com/files/selenium-server-standalone-2.15.0.jar -O selenium.jar
+
+jar xf selenium.jar core/scripts/atoms.js
+ed -- "core/scripts/atoms.js" <<-PATCH
+ 9423s|a.|XPCNativeWrapper(a).|
+ w
+ q
+PATCH
+jar -uf selenium.jar core
+
+rm -r core
View
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+ps -ef|grep sahi|grep -v grep|awk '{print $2}'|xargs kill -9
View
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+ps -ef|grep selenium|grep -v grep|awk '{print $2}'|xargs kill -9
View
@@ -17,10 +17,12 @@
* @author Konstantin Kudryashov <ever.zet@gmail.com>
*/
-require_once __DIR__ . '/../autoload.php.dist';
+require_once __DIR__ . '/../vendor/.composer/autoload.php';
use Behat\Mink\Compiler;
+system('rm *.phar *.tgz');
+
if (!isset($argv[1])) {
throw new RuntimeException('You must provide version.');
}
@@ -41,6 +43,7 @@ echo "PEAR package compiled: mink-$version.tgz\n";
$phar = new Compiler\PharCompiler();
$phar->compile($version);
+system("cp mink-$version.phar mink.phar");
echo "PHAR package compiled: mink-$version.phar\n";
unlink($autoloaderFilename);
View
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+bin/kill_sahi
+bin/start_sahi
+bin/kill_selenium
+bin/start_selenium
+
+phpunit
+
+bin/kill_selenium
+bin/kill_sahi
View
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+BASEDIR=$(dirname $0)
+cd $BASEDIR/../vendor/sahi/bin
+
+sh sahi.sh > /dev/null &
+sleep 5
View
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+BASEDIR=$(dirname $0)
+cd $BASEDIR/../vendor
+
+java -jar selenium.jar > /dev/null &
+sleep 5
Oops, something went wrong.

0 comments on commit 164b2f6

Please sign in to comment.