fixes#12840
Used @nkovacs draft as starting
point(https://github.com/yiisoft/yii2/issues/11037#issuecomment-193356450).
I also fixed some bugs in `yii.validation.js` and did some refactoring.
Implemented tests:
- yii.validation.js
Running tests:
- Install Node.js. I used the latest version available at the moment -
`v7.1.0`. Note that used `jsdom` dependent library version requires
`Node.js >= 4`.
- Run `npm install` to install dependencies.
- Execute `npm test` for running tests.
Switch from precise to trusty is required mainly because of jsdom
dependency. It requires Node.js > 4. Precise has very old Node.js and
NPM versions and they can not be updated because of default versions of
C++ compilers. While it's possible somehow to install Node 6 on Precise,
see this [document](https://github.com/nodesource/distributions/blob/master/OLDER_DISTROS.md),
I think this is not elegant solution and I'm not 100%
sure it will work correctly with Travis and container-based precise dist.
Trusty has v6.3.0 by default which is enough and way better and newer.
* Test against the current hhvm version
This provides the current HHVM version (3.15.2 as of this PR) and will track with each release (i.e. will be 3.16 when 3.16 is released.
If testing against HHVM LST versions is desired follow this guide. https://docs.travis-ci.com/user/languages/php#HHVM-versions
Should be able to change to container based Trusty after Q1-17 https://blog.travis-ci.com/2016-11-08-trusty-container-public-beta/
* Try to create travis user for trusty hhvm and grant permissions
remove conditionals for apc and memcache
* more tweaks to grant privileges
* try 127.0.0.1 rather than localhost
* grant after db create
* try a different create user grant privileges form
* try to specify postgresql: "9.3" for hhvm
* need to look more into specifying postgresql: "9.3"
hhvm issues
* addon with no dash postgresql: "9.3"
* requested change && not ||
* redis-server isn't needed here
* Apply @cebe's patch for pgsql test failure
* Update .travis.yml
* Update CommandTest.php
* Update CommandTest.php
* Update CommandTest.php
try to fix hhvm tests
* Update CommandTest.php