Commit Graph

2875 Commits

Author SHA1 Message Date
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
Carsten Brandt
1d4eb072d3 readded comments to phpmd rules #13139 2016-12-05 22:01:05 +01:00
Bizley
5092c9666d Code Climate PHPMD settings (#13139)
* codeclimate phpmd rulesets

* PHPMD ruleset

* phpmd_ruleset moved

* Delete phpmd_ruleset.xml

* ruleset moved
2016-12-05 21:52:39 +01:00
SilverFire - Dmitry Naumenko
0261a5498f Simplified ListViewTest 2016-12-05 22:27:38 +02:00
SilverFire - Dmitry Naumenko
25eafa560e Merge branch '11627-document-and-test-empty-listview' of git://github.com/mytskine/yii2 into mytskine-11627-document-and-test-empty-listview
Conflicts:
	framework/widgets/BaseListView.php
	tests/framework/widgets/ListViewTest.php
2016-12-05 22:19:02 +02:00
Boudewijn Vahrmeijer
7dac3ed1ca Kirkhansen 9053 add radio button column (#13126)
* Added the RadioButtonColumn class and updated the changelog.

* - several enhancements:
- unit tests added
- changelog fixed

* Update CHANGELOG.md

* small markdown fixes

* fix travis: custom ID
2016-12-05 13:58:11 +01:00
Alexander Makarov
a056281fa0 Attempt to make tests pass on travis environment 2016-12-04 00:58:40 +03:00
Robert Korulczyk
35998449eb Add yii\filters\HostControl::$fallbackHostInfo (#13117) 2016-12-03 08:25:39 +02:00
Carsten Brandt
7fead4f011 Merge pull request #12959 from yiisoft/bash-completion
Added bash completion file for ./yii commands
2016-12-03 01:25:06 +01:00
Carsten Brandt
187c44e43e implement suggestion for unknown command in console application
suggestion is based on two principles:

- first suggest commands the begin with the unknown name, to suggest
  commands after accidentally hitting enter
- second find similar commands by computing the levenshtein distance
  which is a measurement on how many changes need to be made to convert
  one string into another. This is perfect for finding typos.
2016-12-03 01:17:50 +01:00
SilverFire - Dmitry Naumenko
4454d05410 Added ZSH completion, moved scripts to a separate directory 2016-12-03 00:36:40 +01:00
Carsten Brandt
beb140446b added test for helpcontroller list action 2016-12-03 00:36:40 +01:00
Carsten Brandt
612afdbc66 Merge pull request #13111 from yiisoft/js-tests
Making JS tests ready to go into master.
2016-12-02 22:35:35 +01:00
Alexander Makarov
e1b0cb4343 Merge branch 'master' into aria-required-and-aria-invalid-input-attributes 2016-12-02 23:38:55 +03:00
SilverFire - Dmitry Naumenko
437825be70 Implemented Container::setDependencies(), Container::setDefinitions
Closes #11758
Closes #13029
2016-12-02 15:08:24 +02:00
Klimov Paul
c17766181f Added QueryInterface::emulateExecution()
Added `QueryInterface::emulateExecution()`, which allows preventing of
the actual query execution.
This allows to cancel `DataProvider` preventing search query execution
in case search model is invalid:

``` php
public function search($params)
    {
        $query = Item::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            $query->where('0=1');
            $query->emulateExecution(); // No SQL execution will be done
            return $dataProvider;
        }
```

This also fix unecessary query in case of `via()` usage. See #12390.

fixes #12390
fixes #6373
close #12708
2016-12-02 13:28:51 +01:00
Alexander Makarov
ed8acc8e03 #12399 adjustments 2016-12-02 01:44:57 +03:00
a.kompaniets
fb779e3ec6 Fixes #12399: Added ActiveField::addAriaAttributes property for aria-required and aria-invalid attributes rendering 2016-12-02 01:44:34 +03:00
SG5
1141fc81a7 Fixes #12735: Fixed yii\console\controllers\MigrateController creating multiple primary keys for field bigPrimaryKey:unsigned 2016-12-02 01:03:24 +03:00
zalatov
deea3cf798 Fixes #12854: Added RangeNotSatisfiableHttpException to cover HTTP error 416 file request exceptions 2016-12-02 00:51:49 +03:00
Boudewijn Vahrmeijer
5784dd1dbf fix travis 2016-12-01 22:48:40 +01:00
Alexander Makarov
b17dfa03a2 Fixes #10488: Fixed incorrect behavior of yii\validation\NumberValidator when used with locales where decimal separator is comma 2016-12-02 00:04:55 +03:00
Vladimir Khramov
dd94ead358 Initial work on #10488 2016-12-02 00:01:51 +03:00
Boudewijn Vahrmeijer
9218adcec2 fixes after @samdark review 2016-12-01 15:34:03 +01:00