Pavel Ivanov
bc9f8bd8a3
Fixes CommandTest::testCreateView() cleanup logic ( #17006 )
...
View must be deleted before deleting the tables on which it depends, otherwise we will get errors when rerunning the tests in the same environment.
For example:
```
1) yiiunit\framework\db\mysql\CommandTest::testCreateView
yii\db\Exception: SQLSTATE[HY000]: General error: 1356 View 'yii2_test.testCreateView' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
The SQL being executed was: SHOW FULL COLUMNS FROM `testCreateView`
```
6 years ago
Pavel Ivanov
379a2002dd
Issue #14609 : test case for further discussion ( #16990 )
6 years ago
SilverFire - Dmitry Naumenko
78aaca7a87
Fixed CommandTest::testBindValuesSupportsDeprecatedPDOCastingFormat()
7 years ago
SilverFire - Dmitry Naumenko
233eeb52d7
fixed unit tests
7 years ago
SilverFire - Dmitry Naumenko
9a949525a1
Fixed deprecated type casting format in Command::bindValues()
...
Fixed #15817
7 years ago
SilverFire - Dmitry Naumenko
e806a3b50a
Added `yii\db\ExpressionInterface` support to `yii\db\Command::batchInsert()`
...
Fixes #15661
7 years ago
Dmitry Naumenko
de1750228d
Fixes #13879 : Added upsert support for `yii\db\QueryBuilder` and `yii\db\Command`
7 years ago
Vladimir Reznichenko
ecf3ef8bf9
Use root NS specification for opcoded functions
7 years ago
Alexander Makarov
c7e55450dd
Reverted #14593
...
(reverted from commit a42bbd8f01
)
7 years ago
Alexander Makarov
a42bbd8f01
Fixes #14593 : Added `yii\db\Command::EVENT_AFTER_EXECUTE` event that is triggered after command is executed
7 years ago
Vladimir Reznichenko
67f67e3a69
SCA with Php Inspections (EA Extended) ( #15571 )
7 years ago
Гордиенко Владислав Юрьевич
8d50844024
#15426 : Added ability to create and drop database views
7 years ago
Alexander Makarov
18281c2156
Added test and adjusted changelog for #15112
7 years ago
Sergey Makinen
cc2e28bd0e
Add transaction/retry support for yii\db\Command
7 years ago
Gabriel Caruso
2992b9b09d
Refactored tests with PHPUnit assert methods ( #15260 )
7 years ago
Alexander Makarov
fb23b0d0ea
Code style fixes
7 years ago
Dmitry Naumenko
7e7faeebd1
Fixed excess escaping in Command::batchInsert() ( #13236 )
7 years ago
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".
7 years ago
Robert Korulczyk
0c0942d6e2
Enable `phpdoc_add_missing_param_annotation` rule in php-cs-fixer config. ( #14681 ) [skip ci]
7 years ago
Robert Korulczyk
b99e955627
Fix CS ( #14665 )
...
* Run php-cs-fixer.
* Enable phpdoc_types rule.
7 years ago
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
7 years ago
Alexander Makarov
7cac7f131d
Set back original locale in #14448 test
7 years ago
Carsten Brandt
cda3089623
Fixed batchInsert casting of double values according to locale ( #14448 )
...
fixes #6526
7 years ago
Robert Korulczyk
12eb936083
Enable `heredoc_to_nowdoc` rule in php-cs-fixer ( #14419 )
7 years ago
Carsten Brandt
f212bc6caf
ensure tablenames are not replaced in insert and update
7 years ago
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.
7 years ago
Sergey Makinen
52f8539135
Add Command tests
7 years ago
Sergey Makinen
73ac13e6d7
Implement retrieving dbms constraints
7 years ago
brandonkelly
3456c4e0fd
!==
8 years ago
brandonkelly
11c0d4bf15
Skip just certain things for sqllite
8 years ago
brandonkelly
237af91e8e
Skip testAutoRefreshTableSchema on sqllite
8 years ago
brandonkelly
e242e9b0ee
Fixes #14072 : clear table schema cache for all methods that affect cache
8 years ago
Sergey Makinen
454f0a9301
Fixes #13807 : Fixed `yii\db\QueryBuilder` to inherit subquery params when building a `INSERT INTO ... SELECT` query
8 years ago
Klimov Paul
dee88787fc
compatibility with PHPUnit 6.x added
8 years ago
Alexander Makarov
3f8e8a89eb
Used more specific unit test assertions in framework tests
8 years ago
gagatust
6397791513
Fixed whitespaces to match code style [skip ci]
8 years ago
Alex
6db6a2ddbe
Fixes #13418 : Fixed `QueryBuilder::batchInsert()` if $rows is `\Generator`
8 years ago
Nikolay Oleynikov
323568c2e9
Remove trailing spaces from sources and tests ( #13621 ) [skip ci]
8 years ago
PowerGamer1
37b8cbb2d0
Fixes #12758 : Added the ability to use instances of `\yii\db\Query` class as values in the `\yii\db\QueryBuilder::insert()` method
8 years ago
Alexander Makarov
c4175be7a3
Adjusted command test for incorrect inserts to use data provider
8 years ago
voroks
25f08afc96
Fixes #8293 : `yii\db\Query` can be passed to `insert` method in `yii\db\QueryBuilder`
8 years ago
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
8 years ago
Robert Korulczyk
104712103b
Fixes #11693 : Handle QueryBuilder::batchInsert() calls with no data to insert. ( #11812 )
8 years ago
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
8 years ago
cuiliang
c0df003ac0
merge from master
8 years ago
Alexander Makarov
c36e679519
MSSQL doesn't have SUBSTR and isn't able to use expressions in ORDER BY and GROUP BY
9 years ago
Carsten Brandt
5a462dc5d2
added tests and documentation for #8824
9 years ago
Alexander Makarov
615a29f04e
More fixes for MSSQL tests
9 years ago
Edgard Lorraine Messias
7c9b7c77a7
Added tests for dropTable, truncateTable and renameTable
9 years ago
SilverFire - Dmitry Naumenko
58119c5b11
Fixed testCreateTable, testAlterTable now quotes table name
9 years ago