Commit Graph

2875 Commits

Author SHA1 Message Date
Robert Korulczyk
bf841b926d Additional tests. 2017-02-19 23:19:48 +01:00
Robert Korulczyk
8d4a197d19 Fix bug with creating URL in UrlRule with optional params at the beginning of pattern. 2017-02-19 22:51:02 +01:00
Robert Korulczyk
5d81af21fb Fix bug with optional params at the beginning of pattern in UrlRule. 2017-02-19 22:26:37 +01:00
Dmitry Klyukin
ecd2dc0d1b Model loadMultiple test (#13585) 2017-02-19 20:40:45 +03:00
Nikolay Oleynikov
323568c2e9 Remove trailing spaces from sources and tests (#13621) [skip ci] 2017-02-19 17:34:22 +03:00
Sergey Makinen
ef4dadf437 Fixes #13592: Fixes Oracle’s yii\db\oci\Schema::setTransactionIsolationLevel() 2017-02-19 17:32:51 +03:00
Kolyunya
edc7a55692 Add a failing test to the yii\web\UrlRule 2017-02-18 23:25:03 +03:00
Alexey Rogachev
6b8cf1709e Fixes #13306: Wildcard in reloadableScripts in yii.js allows 0 characters 2017-02-18 22:01:01 +03:00
Nikolay Oleynikov
e8f8ba2129 Remove excessive use statement (#13604) 2017-02-18 21:56:56 +03:00
Dmitry Naumenko
569bc89eaf Merge pull request #13340 from Vovan-VE/usemaster-improve
Exception within useMaster() completely disables slaves
2017-02-18 18:12:13 +02:00
Boudewijn Vahrmeijer
45d670c995 Update ConnectionTest.php 2017-02-18 15:49:24 +01:00
Nikolay Oleynikov
a26d28f8e3 Fixes #13576: Added support of srcset to yii\helpers\Html::img() 2017-02-18 02:23:20 +03:00
Tobias Munk
0e0caef508 Merge branch 'tests/mysql' into feature/docker-testing 2017-02-16 16:49:32 +01:00
Tobias Munk
2fad692bc7 Merge commit '22972b86dbcc6e010dc90df921090e713521f0b9' into feature/docker-testing 2017-02-16 16:49:00 +01:00
Tobias Munk
9f95f71572 added groups to tests 2017-02-16 16:46:10 +01:00
Carsten Brandt
22972b86db update date formatter test for intl
some tests where not run with intl extension enabled.
2017-02-16 16:20:07 +01:00
Bizley
54278fc842 asTime fixed for time-only values
close #13348
fixes #13343
2017-02-16 16:07:52 +01:00
Tobias Munk
ec8daa0d77 added db group to test 2017-02-16 15:42:24 +01:00
Tobias Munk
7a4666fe3a added build trigger example 2017-02-16 15:29:14 +01:00
Elvira Sheina
3a4505ac08 Fixes #11230: Include defaultRoles in yii\rbac\DbManager->getRolesByUser() results 2017-02-15 01:26:33 +03:00
Alexey Rogachev
8e1a4208ed Improved way of testing jQuery's AJAX "script" and "jsonp" requests (#13554) 2017-02-14 00:13:56 +03:00
Sergey Makinen
a5ab79746b Fixes Oracle’s test fixture 2017-02-12 21:59:37 +03:00
Vovan-VE
3538bde085 Add test case for #13340 and update CHANGELOG 2017-02-10 11:24:20 +08:00
Tobias Munk
0dd1ed6594 use custom docker config in dockerized tests 2017-02-09 16:56:41 +01:00
Tobias Munk
7b43cf09f1 added separate docker config for testing 2017-02-09 16:27:40 +01:00
Tobias Munk
0a4fdf2832 Merge commit '95b7ffc066c03f2510ef4e6681e1ddf1494e916f' into feature/docker-testing
# Conflicts:
#	tests/framework/db/sqlite/QueryBuilderTest.php
2017-02-09 16:24:28 +01:00
Paul Klimov
95b7ffc066 Fix #13278: DbQueryDependency created (#13384)
`DbQueryDependency` created
2017-02-09 12:30:53 +02:00
Carsten Brandt
e82b40abee avoid duplicate slashes on empty values
fixes #13522
close #13525
2017-02-08 09:41:04 +01:00
Carsten Brandt
456d23272c added failing test for #13522
regression after 2.0.11 release.
2017-02-08 09:40:53 +01:00
Carsten Brandt
fba4e43469 added failing test for #13533
issue #13533
PR #13534
2017-02-08 09:10:19 +01:00
Robert Korulczyk
4c46c6a096 Improve messages test on HHVM. (#13520) 2017-02-06 09:54:13 +01:00
Carsten Brandt
25b78aa615 Fixes #13508: Fixed duplicate attachment of behavior BC break
Fixes BC break introduced in
954c771fdb (diff-d45d5e14cbb9739c2e1c63b53ba5e363L669)
2017-02-04 15:47:04 +03:00
Bizley
1749c46c5d Fixes #11502: Fixed yii\console\controllers\MessageController to properly populate missing languages in case of extraction with "db" format 2017-02-02 02:50:34 +03:00
Carsten Brandt
a7f8d0efb4 added test for #12697 2017-01-31 13:42:38 +01:00
ErickSkrauch
c641513583 Implementation of support UrlRule with relative host definition
close #12697
fixes #12691
2017-01-31 13:42:31 +01:00
Carsten Brandt
1e4484748b Merge pull request #13477 from yiisoft/urlmanager-test
Refactored UrlManagerTest to cover more use cases
2017-01-31 11:54:03 +01:00
Elvira Sheina
d39c491022 Fix BC breaking #13475 (#13478) 2017-01-31 11:56:46 +03:00
Carsten Brandt
8faedcbd7c Refactored UrlManagerTest to cover more use cases
UrlManager is a complex class with a large bunch of options that needs
to be tested
and we had a few regressions in the past even though there are already a
lot of tests
covering it. Test coverage measured by lines does not help us determine
how good it is tested,
we need test coverage for every major path through the code.

I have refactored the UrlManager tests to reflect the different options
and cases to
have a better overview of which cases are covered and which are not.

UrlManager has two main operation modes:

- "default" url format, which is the simple case. These are covered by
  methods in `UrlManagerTest`.

- "pretty" url format. This is the complex case, which involves UrlRules
  and url parsing.
  I have created two separate classes for this case:
  Url creation for "pretty" url format is covered by
`UrlManagerCreateUrlTest`.
  Url parsing for "pretty" url format is covered by
`UrlManagerParseUrlTest`.

Each of the test classes have a `getUrlManager` method that creates a
UrlManager instance
with a specific configuration and certain variations in options.
It is also tested that options that are not relevant in a certain
operation mode have no effect on the result.

To make sure to not remove tests that have existed before, here is a map
of where code has been moved.
The following test methods existed in the [old test
class](4187718c14/tests/framework/web/UrlManagerTest.php):

- `testCreateUrl()` split between UrlManagerTest and
  UrlManagerCreateUrlTest variations should all be covered by
`variationsProvider()`.
- `testCreateUrlWithNullParams()` covered by UrlManagerCreateUrlTest by
  `testWithNullParams()`
- `testCreateUrlWithEmptyPattern()`
- `testCreateAbsoluteUrl()` covered in UrlManagerCreateUrlTest by new
  tests via `variationsProvider()`.
- `testCreateAbsoluteUrlWithSuffix()` covered in UrlManagerCreateUrlTest
  by `testAbsolutePatterns`.

- `testParseRequest()` covered by UrlManagerParseUrlTest, UrlNormalizer
  related parts moved to UrlNormalizerTest.
- `testParseRESTRequest()` moved to UrlManagerParseUrlTest
- `testHash()` covered in different tests in UrlManagerCreateUrlTest.
- `testMultipleHostsRules($host)` kept as is.

Before:

    $ vendor/bin/phpunit tests/framework/web/UrlManagerTest.php
    ...
    OK (12 tests, 89 assertions)

After:

    $ vendor/bin/phpunit tests/framework/web/UrlManager*.php
    ...
    OK (72 tests, 648 assertions)
2017-01-31 02:38:35 +01:00
Carsten Brandt
4187718c14 added missing groups to tests 2017-01-30 23:03:11 +01:00
PowerGamer1
37b8cbb2d0 Fixes #12758: Added the ability to use instances of \yii\db\Query class as values in the \yii\db\QueryBuilder::insert() method 2017-01-29 00:54:46 +03:00
Alexander Makarov
c4175be7a3 Adjusted command test for incorrect inserts to use data provider 2017-01-29 00:22:10 +03:00
voroks
25f08afc96 Fixes #8293: yii\db\Query can be passed to insert method in yii\db\QueryBuilder 2017-01-28 23:47:26 +03:00
Alexander Makarov
1cc327f108 Run common batch insert tests for SQLite 2017-01-28 14:41:57 +03:00
Dmitriy Bashkarev
be4ebdd049 Fixes #13134: Added logging URL rules (bashkarev) 2017-01-27 19:03:45 +03:00
Alexey Rogachev
37f19a0256 Fixes #13300, #13307, #13310, #13312
- Bug #13300: Allow pjax with "data-pjax" with no value in `yii.js`.
- Bug #13307: Preventing of race conditions in script filter in `yii.js` works incorrectly.
- Bug #13310: Handle relative and absolute URLs coincidence in CSS filter in `yii.js`.
- Bug #13312: `skipOuterContainers` option was incorrectly passed to pjax in `handleAction` in `yii.js`.
- Partially fixes #13299.

Adds tests for #8014, #11921, #10974, #11494, #10358, #10097.
2017-01-25 11:00:13 +03:00
Tobias Munk
77188682f0 Merge commit 'd4d6c1dabf555e6f14a668df6fcc515bceef2830' into feature/docker-testing 2017-01-24 15:41:39 +01:00
Tobias Munk
478331efe8 updated build
- added git files to dockerignore
- updated local testing
- updated build on branches
2017-01-24 15:41:04 +01:00
Herbert Maschke
d4d6c1dabf Tests for 13393 (#13439)
* add some unit tests regarding redirection for ResponseTest

* also tests yii\web\controller redirect
2017-01-24 16:58:01 +03:00
Herbert Maschke
a6da9d5da8 Added unit tests regarding redirection for ResponseTest (#13437) 2017-01-24 15:05:28 +03:00
Klimov Paul
c73de31a90 Fixed yii\web\MultipartFormDataParser adds an extra newline to every value 2017-01-23 13:18:31 +02:00