Jon Surrell
ffd0d380ee
Remove threshold logic from handlers.
...
Email handler implements threshold logic internally. Other handlers handle all logs received.
Handler constructors have changed.
2016-12-29 11:58:43 +01:00
Jon Surrell
85fa9df7fe
Drop "bubbling" support for logs
...
The concept of bubbling or consuming logs has little benefit for our use case.
Drop support for bubbling and simplify logging.
2016-12-29 11:58:43 +01:00
Jon Surrell
4f77954bc7
Move log levels to independent class
2016-12-29 11:58:43 +01:00
Jon Surrell
60314e5ba1
Fix spelling errors
2016-12-29 11:58:43 +01:00
Jon Surrell
eca10f6362
Explicit use of file log handler for logger tests
2016-12-29 11:58:43 +01:00
Jon Surrell
0f13cca921
Use autoloader for log handlers
2016-12-29 11:58:43 +01:00
Jon Surrell
81223995fc
Add basic email logger test
2016-12-29 11:58:42 +01:00
Jon Surrell
ceea56e323
Add test for multiple file log handlers writing to same file.
2016-12-29 11:58:42 +01:00
Jon Surrell
b6304cbcc4
Prefer "unit-tests" tag for testing log handler
2016-12-29 11:58:42 +01:00
Jon Surrell
dd2474fb3c
Rename test file log -> logger
2016-12-29 11:58:42 +01:00
Jon Surrell
dce4e7c21a
Fix misnamed test class
2016-12-29 11:58:42 +01:00
Jon Surrell
e5b369b431
Remove bad logger test
...
Test comparing equality of logger results could randomly fail depending on execution time.
The coverage was duplicated by other tests, test was redundant and has been removed.
2016-12-29 11:58:42 +01:00
Jon Surrell
05146089cd
Add DB handler tests
2016-12-29 11:58:42 +01:00
Jon Surrell
0f63e5bfdb
Add severity level tests
2016-12-29 11:58:42 +01:00
Jon Surrell
822981c009
Improve handle signature
...
The signature of WC_Log_Handler::handle mirrors log messages which is more intuitive.
Method docblocks have also been improved and are more complete.
2016-12-29 11:58:42 +01:00
Jon Surrell
e7d6a9a48b
Rotate logs
...
WC_Log_Handler_File now includes log rotation.
Add and improve tests.
2016-12-29 11:58:42 +01:00
Jon Surrell
7359cca4a9
Add specific file log handler tests
2016-12-29 11:58:42 +01:00
Jon Surrell
ad03597a3d
Simplify default log entry format
...
Remove punctuation. Space separate values:
TIMESTAMP LEVEL MESSAGE
2016-12-29 11:58:42 +01:00
Jon Surrell
e722870aa4
Fix tests for PHP 5.2
2016-12-29 11:58:42 +01:00
Jon Surrell
8600ccc6de
Restructure log tests to own directory
...
Also moves parent::tearDown to end of tearDown
Fix phpcs problems.
2016-12-29 11:58:42 +01:00
Jon Surrell
fe02d44e31
Defauly log file level is DEBUG
2016-12-29 11:58:42 +01:00
Jon Surrell
7ba54d8617
Add test for log() === [level_short_method]()
2016-12-29 11:58:42 +01:00
Jon Surrell
227651df77
Add `setMethods` to test mocks
...
This may improve php 5.2 test failures
2016-12-29 11:58:42 +01:00
Jon Surrell
83aad2ba2e
Use older test mock syntax for legacy compatibility.
2016-12-29 11:58:42 +01:00
Jon Surrell
c5c0563f7c
Restore deprecated functions WC_Logger::clear & WC_Logger::remove
...
Also updates clear test to supply required argument.
2016-12-29 11:58:42 +01:00
Jon Surrell
fda6ab57bc
Fix tests for compatibility with PHP5
2016-12-29 11:58:42 +01:00
Jon Surrell
55963b09a8
Extract anonymous functions to improve test compatibility.
2016-12-29 11:58:42 +01:00
Jon Surrell
3ef2ae611d
Cleanup "A" test log file
2016-12-29 11:58:42 +01:00
Jon Surrell
c418623fed
Add tag context test for file log handler
2016-12-29 11:58:42 +01:00
Jon Surrell
44ea69c579
Adds tests for bubbling, etc.
...
Add tests teardown to cleanup log files
Fix errors in log handlers
2016-12-29 11:58:42 +01:00
Jon Surrell
7e79746302
Update tests for WC_Logger
2016-12-29 11:58:42 +01:00
Jon Surrell
4000ba6aea
Use strict `assertTrue` and `assertFalse` over `assertEquals( true|false )`
2016-12-20 23:33:35 +01:00
Mike Jolley
e5c18fd6e4
Fix currency check unit tests
2016-12-19 15:11:25 +00:00
Mike Jolley
ac1c9b5b7b
Fix test
2016-12-14 11:07:39 +00:00
Mike Jolley
b5f9d6b6eb
Merge percent and cart percent coupon types
2016-12-14 11:07:08 +00:00
Mike Jolley
47fbae4d26
Product Visibility Taxonomies ( #12527 )
...
* Convert visibility and featured to taxonomy
* Comment
* Add missing tax_queries
* Only check SKU after read.
* Added visibility term for outofstock products to speed those queries up al
* wc_bool_to_string
2016-12-08 10:56:45 +00:00
Mike Jolley
5139c811d6
Merge pull request #12533 from woocommerce/rest-api-4.7
...
[2.6] API Fixes for 4.7
2016-12-07 18:51:47 +00:00
Mike Jolley
a6a4650809
Fix theme test
2016-12-07 13:46:01 +00:00
Mike Jolley
6a7ceab462
Fix tests by casting to array
2016-12-07 11:37:11 +00:00
Mike Jolley
44ee5f7ed3
Ensure products have different timestamps in tests.
2016-12-06 10:46:48 +00:00
Mike Jolley
84a930a607
Variations are returned newest to oldest in tests. Ensure dates differ.
2016-12-05 18:51:29 +00:00
Mike Jolley
5f64f1bf0a
Customer tests for role
2016-11-25 14:48:21 +00:00
Mike Jolley
086d8bce1d
Fix is_callable
2016-11-25 14:48:20 +00:00
Mike Jolley
9087a45f29
Remove attribute_ prefix rather than add so that get_attributes has better return values, and don't show duplicate data in cart.
2016-11-24 14:20:48 +00:00
Mike Jolley
4ca49ba999
Fix tests
2016-11-23 16:27:18 +00:00
Mike Jolley
d7dfdd3d10
Wrap all deprecation calls.
2016-11-23 16:15:00 +00:00
Claudio Sanches
1c9c26cda6
Fixed syntax for old versions of PHP
2016-11-23 12:56:08 -02:00
Claudio Sanches
8d19832937
Fixed coding standards
2016-11-22 23:47:13 -02:00
Mike Jolley
885dad605a
Interface naming
2016-11-22 13:54:51 +00:00
Justin Shreve
dd0a2317f1
Fix up data tests and some coding standards issues
2016-11-22 04:05:05 -08:00