Commit Graph

3198 Commits

Author SHA1 Message Date
Klimov Paul
194577c55e Code style fix 2016-12-26 15:39:33 +02:00
kidol
3ea5b97585 Fix existing test 2016-12-21 19:37:43 +01:00
Carsten Brandt
c4857176ac added test for ArrayHelper::multisort() with closure key
related to #13248
2016-12-20 14:14:01 +01:00
SilverFire - Dmitry Naumenko
ed82ba4ee2 Revert "fix ArrayHelper::getValue() to throw exception on invalid input"
This reverts commit e963b2af64 because of BC breaking reported in #13248.

To know more about the reasons of commit revertinvg, visit https://github.com/yiisoft/yii2/issues/13248
2016-12-20 12:39:25 +02:00
p.chapl
5488fc6e28 fixes #13221
Make \yii\db\QueryTrait::limit and \yii\db\QueryTrait::offset methods works with \yii\db\Expression
2016-12-20 14:08:03 +07:00
Dmitry Naumenko
8562055937 Merge pull request #13216 from yiisoft/arrayhelper-error
fix ArrayHelper::getValue() to throw exception on invalid input
2016-12-18 20:02:26 +02:00
Pavel Chaplygin
25e6eb04a5 refs #11122: Fixed can not use orderBy with aggregate functions (#12772)
* refs #11122: Fixed can not use `orderBy` with aggregate functions like `count`, `max` etc.

* Update QueryTest.php
2016-12-18 11:28:34 +02:00
SilverFire - Dmitry Naumenko
a710345ea7 Enhanced PHPDocs, added Unit tests, updated CHANGELOG 2016-12-18 11:24:24 +02:00
Alexey Rogachev
8d813f7bf1 Fixes #12840, #12836, #13231, #13232
Additionally added tests for #10302 (#10284 (comment)), #10284 (#10217 (comment)), #11729
2016-12-18 12:06:17 +03:00
SilverFire - Dmitry Naumenko
24dae19fc8 ListView: PHPDocs and tests enhanced 2016-12-18 10:56:52 +02:00
SilverFire - Dmitry Naumenko
cdabb660d6 Refactored ListView::beforeItem, ::afterItem. Added Unit tests. 2016-12-18 10:52:12 +02:00
Robert Korulczyk
2a68351ec3 Fix tests on travis. (#13238) 2016-12-18 01:24:41 +03:00
SilverFire - Dmitry Naumenko
df733d1bbe Fixed QueryBuilderTest 2016-12-17 22:08:13 +02:00
SilverFire - Dmitry Naumenko
2f8225a244 Fixed QueryBuilderTest to work with PgSQL and other DBMS 2016-12-17 21:58:22 +02:00
Daniel Gómez Pan
b985ea3476 Fix #13108: Negative integer parameter causes "Unknown alias" error w… (#13220)
* Fix #13108: Negative integer parameter causes "Unknown alias" error when you execute command console

* Fix #13108: Fix small issues

* Update Request.php

change order
2016-12-17 21:30:36 +02:00
SilverFire - Dmitry Naumenko
54c7e0c434 Added tests for QueryBuilder::batchInsert() 2016-12-17 19:20:01 +02:00
Alexander Makarov
a7f0a3c147 Merge branch 'master' into fix-numbervalidator-comma-decimal-separator 2016-12-17 16:39:00 +03:00
Robert Korulczyk
08054bba6d Fix tests. (#13227) 2016-12-17 16:37:31 +03:00
Ni-san
5795b3937e Added rbac\BaseManager::hasNoAssignments() 2016-12-17 12:37:36 +02:00
Carsten Brandt
66e8158716 Fixes #11771: Fixed semantics of yii\di\ServiceLocator::__isset() to match the behavior of __get() which fixes inconsistent behavior on newer PHP versions 2016-12-16 23:48:08 +03:00
Brandon Kelly
350e93e626 Fixes #12612: Query conditions added with yii\db\Query::andWhere() now get appended to the existing conditions if they were already being joined with the and operator 2016-12-16 13:19:14 +03:00
Alexander Makarov
8c5c7047a6 Merge branch 'master' into fix-pjax-automatic-id 2016-12-16 12:47:18 +03:00
Carsten Brandt
e963b2af64 fix ArrayHelper::getValue() to throw exception on invalid input
fixes #12927
2016-12-16 01:49:37 +01:00
Carsten Brandt
9821c589c5 fixed issue with rest\UrlRule extraPatterns
url creation did not work when no HTTP verb was specified.
fixes #13200
2016-12-16 00:00:27 +01:00
Alexander Makarov
e83624df9e Closes #11418: Added test for #11418 2016-12-16 01:43:54 +03:00
SilverFire - Dmitry Naumenko
11c58549d4 Fixed FileHelperTest::testFindFilesRecursiveWithSymLink() 2016-12-15 23:36:16 +02:00
Alexander Makarov
2f7c1b36b5 Fixes #12419: Added ability to remove root tag and object tags for yii\web\XmlResponseFormatter 2016-12-16 00:27:31 +03:00
SilverFire - Dmitry Naumenko
9a45b70adf Updated FileHelperTest 2016-12-15 23:21:23 +02:00
Alexander Makarov
877f82d27c Merge branch 'master' into fix-pjax-automatic-id 2016-12-15 22:07:58 +03:00
Alexander Makarov
3e03237713 Merge branch 'master' into query-filter-having 2016-12-15 18:04:05 +03:00
Alexander Makarov
b78d6367ba Removed duplicate assertion from tests, divided test method into two 2016-12-15 18:02:25 +03:00
Elvira Sheina
bfba0aa711 Refactor validateAttribute method in UniqueValidator (#13202)
* Refactor validateAttribute method in UniqueValidator

Extract prepareParams and prepareQuery from validateAttribute,
so they can be tested separately.

* Added issue number to changelog

* Eliminated unneeded variable

* Renamed methods and parameters, update PHPDocs
2016-12-15 12:23:16 +01:00
Carsten Brandt
01997441cc added tests for rest\UrlRule::createUrl()
verify issue #13200
2016-12-15 01:41:28 +01:00
Alexander Makarov
837b33767c Fixes #11697: Added filterHaving(), andFilterHaving() and orFilterHaving() to yii\db\Query
Signed-off-by: Alexander Makarov <sam@rmcreative.ru>
2016-12-14 23:58:04 +03:00
SilverFire - Dmitry Naumenko
88f2348ed5 Fixed ActiveRecord::unlinkAll() to respect onCondition()
Closes #12213
2016-12-14 22:51:21 +02:00
SilverFire - Dmitry Naumenko
a132ee9a08 Fixed order or checks in IpValidator
Fixes #13198
2016-12-13 18:14:04 +02:00
Klimov Paul
50b668eee8 redundant code removed 2016-12-13 16:54:51 +02:00
Chris Harris
ae83dd0524 Fixes #13128: Fixed incorrect position of {pos} string in ColumnSchemaBuilder __toString 2016-12-11 23:36:35 +03:00
Robert Korulczyk
8e0af24203 Fix protocol-relative URLs in Url::to() (#13156) (#13157)
* Fix protocol-relative URLs in `Url::to()`

* Use `isRelative()` in `Url::to()`
2016-12-11 20:39:21 +02:00
Zlakomanov Alexander
b8bf0d0c0c added hint into foreign keys query for oracle 11g optimisation
update oci tests
improved varible name

Closes #13122
2016-12-10 20:26:22 +02:00
Alexey Rogachev
d96363674c Added JS tests for yii.captcha.js (#12840), fixes #13159 (#13160)
* Added JS tests for yii.captcha.js (#12840), fixes #13159

* Sinon needs to be imported in similar fashion in other test files

* Added according line to CHANGELOG [skip ci]

* Update CHANGELOG.md

* Try to run tests with default timeout in Travis

* Added note about JS tests to the docs [skip ci]

* Simplified tests for multiple elements (init, destroy methods)
2016-12-10 14:42:28 +02:00
Boudewijn Vahrmeijer
475d18ca58 Merge branch 'master' into fix-pjax-automatic-id 2016-12-09 23:52:06 +01:00
Alexey Rogachev
bd85b7ced2 Closes #6242: Access to validator in inline validation (#13027)
* Closes #6242: Access to validator in inline validation

* Updated PHPDoc according to PR review [skip ci]

* Imrpoved PHPDoc, updated guide info [skip ci]

* Fixes related with PR review

* Corrected CHANGELOG [skip ci]

* Update input-validation.md

added version info
2016-12-08 23:29:53 +01:00
Sergey Makinen
3611aa409b Fixes PageCacheTest: requestedRoute is not set up (#13173) 2016-12-08 23:12:52 +01:00
Boudewijn Vahrmeijer
92eee10ae1 Change the name of method getQueryTableName and remove its $query argument (#12893)
* refactores getQueryTableName:
* replaces the $query argument with a $this implementation

* exposes getQueryTableName to be public instead of private. Fixes #12878

* added unit tests for exposed method

* updated changelog

* - methodname changed to 'getTableNameAndAlias'
- scope back to private
- added @internal tag to emphasize that the method is used purely for the internal workings of this piece of software.
- removed changelog (as the API has not changed)

* update tests
2016-12-08 21:22:18 +01:00
Carsten Brandt
65e4a28800 consistent behavior for Yii::$app->controller and ->action (#13167)
Fixed inconsistency, `Yii::$app->controller` is available
after handling the request since 2.0.10, this is now also the case for
`Yii::$app->controller->action`.

fixes #12795
2016-12-08 18:00:05 +01:00
Carsten Brandt
4fd7a9d29e Merge branch 'sergeymakinen-pagecache-tests' PR #13149
* sergeymakinen-pagecache-tests:
  refactored pagecache test
  Adds tests for yii\filters\PageCache

close #13149
2016-12-08 15:08:18 +01:00
Carsten Brandt
8913bee15a refactored pagecache test
- use dataprovider for different test cases instead of foreach
- use time mocking to avoid sleep(2)
2016-12-08 15:07:33 +01:00
Sergey Makinen
f8787b4471 Adds tests for yii\filters\PageCache 2016-12-08 15:06:56 +01:00
Carsten Brandt
48c806fe1c added unit test for DynamicModel::load()
issue #12116
2016-12-07 00:21:00 +01:00