Robert Korulczyk
5349132043
Use `sprintf()` in `Target::getTime()` ( #16883 )
...
* Use `sprintf()` in `Target::getTime()`.
* Changelog line [skip ci].
6 years ago
cuileon
489dd119a5
merge from yiisoft/yii2
6 years ago
Evgeniy Moiseenko
9864837764
Revert change and added default time zone to test ( #16876 )
...
* Revert change and added default time zone to test(#15528 )
* Return comment(#15528 )
6 years ago
SilverFire - Dmitry Naumenko
a1a2932131
Added test to check issue #15902
...
Closes #15902
7 years ago
Dmitry Alekseev
2adf654888
link to a bug in the tests
7 years ago
Dmitry Alekseev
1b14628dbf
Directory creation is moved to export() method
7 years ago
Bizley
8b74e29663
Fixes #14296 : Fixed log targets to throw exception in case log can not be properly exported
7 years ago
Klimov Paul
71c541773f
PHPDoc fix
7 years ago
Klimov Paul
65f6b59b35
`@inheritdoc` notation changed
7 years ago
Alexander Makarov
6b0be47e0f
Fixes #14711 : Fixed `yii\web\ErrorHandler` displaying exception message in non-debug mode
7 years ago
Roman Ishchenko
b354b26d03
Fixes #15081 : Fixed "Undefined offset: 1" in log Target
7 years ago
Alexander Makarov
fb23b0d0ea
Code style fixes
7 years ago
SilverFire - Dmitry Naumenko
c0d8b0a817
Fixed sqlite tests
...
Prevent marking some tests as risky
7 years ago
Pavel Chaplygin
d49ec7b8be
Fixes #14633 : Add miliseconds to log time in `\yii\log\Target`
7 years ago
Dmitry Dorogin
9b01ca275f
Fixes #14273 : yii\log\Target::$enabled now supports callable value ( #14539 )
...
* Fixes #14273 : yii\log\Target:: now supports callable value
* added empty line in changelog [skip ci]
* getter and setter
* Update Target.php
7 years ago
Carsten Brandt
711498f93a
Cache user assignments to avoid unnecessary DB queries ( #14696 )
...
* Cache user assignments to avoid unnecessary DB queries
alternative to #9138 and #10981 , only cache on `checkAccess` call which is usually
called on every request. Cache is not necessary in RBAC management.
Similar to #14061 but includes proper cache invalidation and test.
`getAssignments()` always queries the DB. The cache is only applied on
`checkAccess` calls, and invalidated as soon as the RBAC structure is
modified through the manager component (verified by the test case).
Regarding [concerns of memory usage](https://github.com/yiisoft/yii2/pull/14061#issuecomment-297982502 )
if used in batch mode on multiple users, you can call
`invalidateCache()` method if this really causes a problem.
fixes #7743
close #9138
close #14061
close #10981
See also
- https://github.com/yiisoft/yii2/issues/7626#issuecomment-77745166
- https://github.com/yiisoft/yii2/pull/14061#issuecomment-319645488
* improve test naming
* fix tests
* fix assignment cache for non-scalar user-ids
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
1501c659ac
Add empty lines before return statements. ( #14682 ) [skip ci]
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
fe8a0a6a2e
Enable `no_useless_else` rule in php-cs-fixer ( #14420 )
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
Bizley
deea1829db
Fixes #14264 : Fixed a bug where `yii\log\Logger::calculateTimings()` was not accepting messages with array tokens
7 years ago
Bizley
ddee256a1a
Fixes #14133 : Fixed bug when calculating timings with mixed nested profile begin and end in `yii\log\Logger::calculateTimings()`
7 years ago
Carsten Brandt
5ed6910e1c
Added support for cloning a db connection
...
improved fix #14020
fixes #13890
https://github.com/yiisoft/yii2/pull/14020/files#r115185865
close #14121
7 years ago
Andrey Akimov
5695b869a9
Fixes #13890 : DbTarget log transaction bug
8 years ago
Klimov Paul
d8e6a89af9
fixed tests without assettions
8 years ago
Klimov Paul
15561b7a2c
unit test fix
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
Nikolay Oleynikov
323568c2e9
Remove trailing spaces from sources and tests ( #13621 ) [skip ci]
8 years ago
Carsten Brandt
4187718c14
added missing groups to tests
8 years ago
bashkarev
338e5967cb
Added Logging of memory usage
...
calculateTimings added options: `memory`, `memoryDiff` memory_get_usage only the used memory is reported.
close #13268
8 years ago
Tim Beks
f23dc5aee9
Add attribute to set the openlog $option attribute for SyslogTarget
...
Fixes issue #13074
close #13075
8 years ago
Robert Korulczyk
4aa935e69e
Fixes #12055 : Changed `boolean` to `bool` and `integer` to `int` in phpdoc
8 years ago
Klimov Paul
11c93c405c
fix `LoggerTest` to be more reliable
8 years ago
Dmitriy Makarov
2d9b659777
Fixes #12296 : Added value validation to `yii\log\Target::setLevels()`
8 years ago
Dmitriy Makarov
d4536fe645
Added Target test of the following methods: ( #12294 )
...
- getLevels()
- setLevels()
8 years ago
Dmitriy Makarov
dc8f6e8195
Added EmailTarget tests of the following methods: ( #12150 )
...
- init()
- export()
8 years ago
Dmitriy Makarov
81479ff085
Added Dispatcher tests of the following methods: ( #12127 )
...
* Added Dispatcher tests of the following methods:
- getTraceLevel()
- setTraceLevel()
- getFlushInterval()
- setFlushInterval()
- dispatch()
- init()
* [Fix] Added the 'mocking' flag
8 years ago
Dmitriy Makarov
552ad141b6
Added SyslogTarget tests of the following methods: ( #12093 )
...
- export
- formatMessage
8 years ago
Dmitriy Makarov
5d09f32b3b
Added logger tests of the following methods: ( #12083 )
...
- getDbProfiling()
- calculateTimings()
- getElapsedTime()
- getLevelName()
- getProfiling()
8 years ago
Dmitriy Makarov
dc4a4b456c
Test for logger, flush method ( #12041 )
...
* Added test for logger, flush method
- testFlushWithoutDispatcher
- testFlushWitDispatcherAndDefaultParam
- testFlushWitDispatcherAndDefinedParam
* Used 'yii\\log\\Dispatcher' instead of Dispatcher::class as parameter for the getMock method
8 years ago
Dmitriy Makarov
b2b2cb2ada
Added more tests for logger ( #12034 )
...
- testLogWithTraceLavel
- testLogWithFlush
8 years ago
Viktor Pikaev
30bb9bd7c8
Fixes #11462 : Added support of filtering rules to `yii\log\Target::$logVar`, added `\yii\helpers\BaseArrayHelper::filter()` method
8 years ago
Carsten Brandt
6309962c5c
more tests for #11056
9 years ago
Carsten Brandt
22503ebe97
allow setting custom logger in Dispatcher via config
...
fixes #11056
9 years ago
╃巡洋艦㊣
586684b050
2.0.5 bf7edc5
9 years ago
Alexander Makarov
6949992246
Simplified tests directory structure a bit
10 years ago