Commit Graph

56 Commits

Author SHA1 Message Date
SilverFire - Dmitry Naumenko
78aaca7a87 Fixed CommandTest::testBindValuesSupportsDeprecatedPDOCastingFormat() 2018-03-05 15:49:01 +02:00
SilverFire - Dmitry Naumenko
233eeb52d7 fixed unit tests 2018-03-03 18:12:51 +02:00
SilverFire - Dmitry Naumenko
9a949525a1 Fixed deprecated type casting format in Command::bindValues()
Fixed #15817
2018-03-03 17:50:18 +02:00
SilverFire - Dmitry Naumenko
e806a3b50a Added yii\db\ExpressionInterface support to yii\db\Command::batchInsert()
Fixes #15661
2018-02-18 20:23:08 +02:00
Dmitry Naumenko
de1750228d Fixes #13879: Added upsert support for yii\db\QueryBuilder and yii\db\Command 2018-02-09 01:05:50 +03:00
Vladimir Reznichenko
ecf3ef8bf9 Use root NS specification for opcoded functions 2018-02-08 00:00:36 +03:00
Alexander Makarov
c7e55450dd Reverted #14593
(reverted from commit a42bbd8f01)
2018-02-05 14:12:20 +03:00
Alexander Makarov
a42bbd8f01 Fixes #14593: Added yii\db\Command::EVENT_AFTER_EXECUTE event that is triggered after command is executed 2018-02-05 15:49:18 +07:00
Vladimir Reznichenko
67f67e3a69 SCA with Php Inspections (EA Extended) (#15571) 2018-01-29 17:08:57 +07:00
Гордиенко Владислав Юрьевич
8d50844024 #15426: Added ability to create and drop database views 2018-01-19 11:21:07 +03:00
Alexander Makarov
18281c2156 Added test and adjusted changelog for #15112 2018-01-18 01:34:08 +03:00
Sergey Makinen
cc2e28bd0e Add transaction/retry support for yii\db\Command 2017-12-26 13:10:36 +03:00
Gabriel Caruso
2992b9b09d Refactored tests with PHPUnit assert methods (#15260) 2017-11-30 22:10:31 +03:00
Alexander Makarov
fb23b0d0ea Code style fixes 2017-11-01 02:43:02 +03:00
Dmitry Naumenko
7e7faeebd1 Fixed excess escaping in Command::batchInsert() (#13236) 2017-10-23 22:43:39 +03:00
Robert Korulczyk
5a8c3d537b Enable phpdoc_summary rule in php-cs-fixer config (#14675)
* Enable `phpdoc_summary` rule in php-cs-fixer config.

* Fix case in "PHPDoc".
2017-08-21 11:19:35 +02:00
Robert Korulczyk
0c0942d6e2 Enable phpdoc_add_missing_param_annotation rule in php-cs-fixer config. (#14681) [skip ci] 2017-08-21 01:57:23 +03:00
Robert Korulczyk
b99e955627 Fix CS (#14665)
* Run php-cs-fixer.

* Enable phpdoc_types rule.
2017-08-18 12:10:42 +02:00
Carsten Brandt
3dbc07f8dd fix test to work around PDO bug
This test is failing on PHP 7.0.7 on travis but seems fine
on PHP 7.1.x > 7.1.0-alpha

See:

- cda3089623
- https://gist.github.com/cebe/badfec47a8c3fcc4ffcf1625ca8e0655
2017-08-14 12:33:11 +02:00
Alexander Makarov
7cac7f131d Set back original locale in #14448 test 2017-08-14 02:34:23 +03:00
Carsten Brandt
cda3089623 Fixed batchInsert casting of double values according to locale (#14448)
fixes #6526
2017-08-13 22:15:04 +02:00
Robert Korulczyk
12eb936083 Enable heredoc_to_nowdoc rule in php-cs-fixer (#14419) 2017-07-10 13:18:52 +03:00
Sergey Makinen
237e7eda3a Merge branch 'master' of https://github.com/yiisoft/yii2 into db-constraints 2017-06-28 21:42:55 +03:00
Carsten Brandt
f212bc6caf ensure tablenames are not replaced in insert and update 2017-06-16 16:02:34 +02:00
Sergey Makinen
f820d2ca36 Merge branch 'master' into db-constraints 2017-06-16 16:52:43 +03:00
Robert Korulczyk
ba0ab403b5 Added php-cs-fixer coding standards validation to Travis CI (#14100)
* php-cs-fixer: PSR2 rule.

* php-cs-fixer: PSR2 rule - fix views.

* Travis setup refactoring.

* Add php-cs-fixer to travis cs tests.

* Fix tests on hhvm-3.12

* improve travis config

* composer update

* revert composer update

* improve travis config

* Fix CS.

* Extract config to separate classes.

* Extract config to separate classes.

* Add file header.

* Force short array syntax.

* binary_operator_spaces fixer

* Fix broken tests

* cast_spaces fixer

* concat_space fixer

* dir_constant fixer

* ereg_to_preg fixer

* function_typehint_space fixer

* hash_to_slash_comment fixer

* is_null fixer

* linebreak_after_opening_tag fixer

* lowercase_cast fixer

* magic_constant_casing fixer

* modernize_types_casting fixer

* native_function_casing fixer

* new_with_braces fixer

* no_alias_functions fixer

* no_blank_lines_after_class_opening fixer

* no_blank_lines_after_phpdoc fixer

* no_empty_comment fixer

* no_empty_phpdoc fixer

* no_empty_statement fixer

* no_extra_consecutive_blank_lines fixer

* no_leading_import_slash fixer

* no_leading_namespace_whitespace fixer

* no_mixed_echo_print fixer

* no_multiline_whitespace_around_double_arrow fixer

* no_multiline_whitespace_before_semicolons fixer

* no_php4_constructor fixer

* no_short_bool_cast fixer

* no_singleline_whitespace_before_semicolons fixer

* no_spaces_around_offset fixer

* no_trailing_comma_in_list_call fixer

* no_trailing_comma_in_singleline_array fixer

* no_unneeded_control_parentheses fixer

* no_unused_imports fixer

* no_useless_return fixer

* no_whitespace_before_comma_in_array fixer

* no_whitespace_in_blank_line fixer

* not_operator_with_successor_space fixer

* object_operator_without_whitespace fixer

* ordered_imports fixer

* php_unit_construct fixer

* php_unit_dedicate_assert fixer

* php_unit_fqcn_annotation fixer

* phpdoc_indent fixer

* phpdoc_no_access fixer

* phpdoc_no_empty_return fixer

* phpdoc_no_package fixer

* phpdoc_no_useless_inheritdoc fixer

* Fix broken tests

* phpdoc_return_self_reference fixer

* phpdoc_single_line_var_spacing fixer

* phpdoc_single_line_var_spacing fixer

* phpdoc_to_comment fixer

* phpdoc_trim fixer

* phpdoc_var_without_name fixer

* psr4 fixer

* self_accessor fixer

* short_scalar_cast fixer

* single_blank_line_before_namespace fixer

* single_quote fixer

* standardize_not_equals fixer

* ternary_operator_spaces fixer

* trailing_comma_in_multiline_array fixer

* trim_array_spaces fixer

* protected_to_private fixer

* unary_operator_spaces fixer

* whitespace_after_comma_in_array fixer

* `parent::setRules()` -> `$this->setRules()`

* blank_line_after_opening_tag fixer

* Update finder config.

* Revert changes for YiiRequirementChecker.

* Fix array formatting.

* Add missing import.

* Fix CS for new code merged from master.

* Fix some indentation issues.
2017-06-12 12:25:45 +03:00
Sergey Makinen
52f8539135 Add Command tests 2017-05-15 20:55:26 +03:00
Sergey Makinen
73ac13e6d7 Implement retrieving dbms constraints 2017-05-15 20:55:25 +03:00
brandonkelly
3456c4e0fd !== 2017-04-28 14:23:08 -07:00
brandonkelly
11c0d4bf15 Skip just certain things for sqllite 2017-04-28 12:17:45 -07:00
brandonkelly
237af91e8e Skip testAutoRefreshTableSchema on sqllite 2017-04-28 06:38:02 -07:00
brandonkelly
e242e9b0ee Fixes #14072: clear table schema cache for all methods that affect cache 2017-04-27 10:34:08 -07:00
Sergey Makinen
454f0a9301 Fixes #13807: Fixed yii\db\QueryBuilder to inherit subquery params when building a INSERT INTO ... SELECT query 2017-04-17 03:31:43 +03:00
Klimov Paul
dee88787fc compatibility with PHPUnit 6.x added 2017-04-13 14:49:43 +03:00
Alexander Makarov
3f8e8a89eb Used more specific unit test assertions in framework tests 2017-03-14 09:45:31 +03:00
gagatust
6397791513 Fixed whitespaces to match code style [skip ci] 2017-03-14 09:42:13 +03:00
Alex
6db6a2ddbe Fixes #13418: Fixed QueryBuilder::batchInsert() if $rows is \Generator 2017-02-24 00:28:27 +03:00
Nikolay Oleynikov
323568c2e9 Remove trailing spaces from sources and tests (#13621) [skip ci] 2017-02-19 17:34:22 +03: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
Walt Sorensen
f76f0cff6c Test against the current hhvm version (#12971)
* 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
2016-11-15 16:50:41 +01:00
Robert Korulczyk
104712103b Fixes #11693: Handle QueryBuilder::batchInsert() calls with no data to insert. (#11812) 2016-06-25 15:51:09 +03:00
Carsten Brandt
8ba032d147 refactored database tests
- changed test class naming for easier copying and searching of classes
- made base tests abstract and made MySQL an equal citisen in the test
  hierarchie
- added missing db specific test classes
2016-06-20 19:26:43 +02:00
Alexander Makarov
c36e679519 MSSQL doesn't have SUBSTR and isn't able to use expressions in ORDER BY and GROUP BY 2016-01-31 01:01:40 +03:00
Carsten Brandt
5a462dc5d2 added tests and documentation for #8824 2016-01-27 16:26:43 +01:00
Alexander Makarov
615a29f04e More fixes for MSSQL tests 2015-12-09 03:07:32 +03:00
Edgard Lorraine Messias
7c9b7c77a7 Added tests for dropTable, truncateTable and renameTable 2015-11-20 16:16:44 +03:00
SilverFire - Dmitry Naumenko
58119c5b11 Fixed testCreateTable, testAlterTable now quotes table name 2015-11-19 00:17:16 +02:00
Alexander Makarov
310f9152e1 Fixes #9268: Improved display of boolean parameters in logged SQL queries 2015-08-01 00:30:16 +03:00