Commit Graph

27842 Commits

Author SHA1 Message Date
Jonathan Belcher dbb0f6f1ef Add links to Sharing and Transferring string 2018-01-16 14:35:30 -05:00
ragulka 2a2418e222 tweak grouped action button margins 2018-01-16 12:15:04 +02:00
Claudiu Lodromanean 3b895bd0a9
Merge pull request #18490 from woocommerce/fix/cart-hash-naming
cart_hash_key param
2018-01-15 10:13:55 -08:00
Steve Grunwell be05a55b9d Add missing documentation within the WC_Unit_Test_Case class that was causing CI to fail. 2018-01-15 17:38:13 +00:00
Steve Grunwell 6261ea6cbb Temporarily disable the WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar sniff at the end of the test_get_system_status_info_theme() method.
The wp_get_theme() function returns a WP_Theme object, which uses uppercase property names, which goes against typical WordPress conventions.

This uses the more modern (read: PHP_CodeSniffer 3.2.0+) syntax for temporarily disabling sniffs. For more details, please see https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-parts-of-a-file.
2018-01-15 17:21:35 +00:00
Steve Grunwell 6fe6faf7ca Don't flag instances of print_r() within the tests/ directory.
In some cases, calls like `print_r( $data, true )` (return the printed array as a string) can be helpful for providing context if/when a test fails.
2018-01-15 17:12:33 +00:00
Steve Grunwell 00268c0fa2 Add a file-level docblock for the WC_Tests_REST_System_Status class 2018-01-15 17:06:42 +00:00
Steve Grunwell 477245c693 The WordPress coding standards dictate that new object instantiation should always use parenthesis 2018-01-15 17:05:01 +00:00
Mike Jolley 270f4c3608 Update text and clear cart meta data. 2018-01-15 17:04:50 +00:00
Steve Grunwell b4f14b4958 Add missing hard-stops at the end of comments, and a missing method comment for test_execute_system_tool_add_order_indexes() 2018-01-15 17:04:27 +00:00
Steve Grunwell 1843a05ea6 *WHITESPACE ONLY* Fix alignment of code to satisfy PHP_CodeSniffer 2018-01-15 17:03:36 +00:00
Steve Grunwell 4804d9e8a5 Don't hold the test suite to the same naming conventions as WordPress/WooCommerce. 2018-01-15 17:02:39 +00:00
Steve Grunwell 8484991f99 Add tests around the add_order_indexes system status tool.
This test ensures that indexes are created within postmeta for any orders that are missing billing_address_index and/or shipping_address_index values.
2018-01-15 16:56:44 +00:00
Jonathan Belcher 535e1c5b58
Updates Helper text to be correct 2018-01-15 11:41:32 -05:00
Claudiu Lodromanean 99f58c4c56
Merge pull request #18488 from woocommerce/fix/18474
Protocol-relative paths are absolute.
2018-01-15 08:28:42 -08:00
Claudiu Lodromanean 6fa23069a4
Merge pull request #18484 from woocommerce/fix/18481
Adding view_items string
2018-01-15 08:15:25 -08:00
Claudiu Lodromanean 1d2c27df6f
Merge pull request #18485 from ragulka/order-status-badge-styling
Gracefully handle order status text overflow
2018-01-15 08:13:50 -08:00
Mike Jolley 431b95dade cart_hash_key param 2018-01-15 16:03:27 +00:00
Steve Grunwell 02f4ed19f4 Merge branch 'master' into tests/reports 2018-01-15 15:57:40 +00:00
Mike Jolley 9a2b051d74 Relative paths are absolute. 2018-01-15 15:41:31 +00:00
Mike Jolley 0006d575a6
Merge pull request #18486 from woocommerce/update-japanese-prefectures-coy
Spelling correction
2018-01-15 15:37:46 +00:00
Mike Jolley 8f6152c7e2 Fix tab corner offset 2018-01-15 15:36:51 +00:00
John Coy 0b0ce465f2 Spelling correction
Japanese prefecture Hokkai-do required hyphen to speparate prefecture from prefecture type.
2018-01-15 09:17:59 -06:00
ragulka a8d8d7d27c gracefully handle overly long order statuses 2018-01-15 16:55:26 +02:00
Mike Jolley 93bac7ce04 Adding view_items string 2018-01-15 14:53:26 +00:00
Mike Jolley c64c726da9 Set instance id 2018-01-15 14:49:55 +00:00
Mike Jolley 054e68a047 Instance ID methods 2018-01-15 14:31:05 +00:00
Mike Jolley ad18445eeb phpcs 2018-01-15 14:28:08 +00:00
Mike Jolley 58efd51a9c phpcs 2018-01-15 12:24:05 +00:00
Mike Jolley 73b5b1c058
Merge pull request #18479 from shivapoudel/main-plugin-file
WooCommerce sniffs for main plugin file
2018-01-15 11:00:50 +00:00
Mike Jolley 4901caa729
Merge pull request #18478 from shivapoudel/cli
Use dirname rather than __DIR__ and use parenthesis for WC_CLI
2018-01-15 11:00:14 +00:00
Shiva Poudel 7a4debede6 WooCommerce sniffs for main plugin file 2018-01-15 11:13:59 +05:45
Shiva Poudel e17d2819ea Use dirname rather than __DIR__ and use parenthesis for WC_CLI 2018-01-15 11:06:53 +05:45
Steve Grunwell d4ca2d87e8 It's only a single scenario, but start writing tests around how WC_Report_Sales_By_Date generates reports 2018-01-12 23:39:55 +00:00
Steve Grunwell e68084d7b8 Add a method by which testcases can load necessary files via include_once.
There are a number of files that are only loaded when another function is called (for example, load a reporting class when displaying a widget). An autoloader would be the ideal way to handle this (both in production and for tests), but until PHP compatibility is sorted out this commit adds an easy fix:

Testcases can now populate the protected, static $includes property with filepaths relative to the project root; when the testcase boots up, these files will automatically be included.
2018-01-12 21:33:20 +00:00
Steve Grunwell d0efd7251e Introduce some basic tests around getting data out of WC_Admin_Report.
The real value of these tests will be ensuring that data is being sourced correctly in the specific implementations of this class.
2018-01-12 19:55:33 +00:00
Claudio Sanches dff5fefe73
Merge pull request #18460 from woocommerce/fix/18448
Revert RTL changes in price formatting
2018-01-12 14:28:36 -02:00
Claudiu Lodromanean bb47315fdd
Merge pull request #18459 from woocommerce/fix/18451
Auth screen escaping
2018-01-12 07:26:54 -08:00
Claudiu Lodromanean 544d181538
Merge pull request #18458 from woocommerce/update/storefront-wizard
Update wizard wording
2018-01-12 07:24:42 -08:00
Mike Jolley dbdc3af9e5 Tests 2018-01-12 14:20:39 +00:00
Mike Jolley 7a7995f697 Revert price formatting changes which break in RTL 2018-01-12 14:16:18 +00:00
Claudio Sanches 7290d6e42e Fixed test string #18430 2018-01-12 11:59:17 -02:00
Mike Jolley ac7bdd1a56 Fix escaping and PHPCS 2018-01-12 13:04:26 +00:00
Mike Jolley 4997e3f939
Merge pull request #18444 from woocommerce/update/readme-contributors
Updates the line inviting everyone to join
2018-01-12 12:32:54 +00:00
Mike Jolley 243c664030 Wording update 2018-01-12 12:29:22 +00:00
Mike Jolley 89c888d654 phpcs 2018-01-12 11:33:26 +00:00
Claudio Sanches b2129b0c44
Merge pull request #18446 from woocommerce/update/readme-storefront-link
Update Storefront link to match other link
2018-01-11 22:32:50 -02:00
Claudio Sanches 1c6529cc83
Merge pull request #18442 from dougaitken/importer-link
add importer link
2018-01-11 22:32:15 -02:00
Claudio Sanches 81dc3cf9bb
Merge pull request #18450 from liquidweb/feature/remove-compat-check-for-tests-dir
Exclude the /tests/ directory from PHP Compatibility checks
2018-01-11 22:31:27 -02:00
Steve Grunwell 4cded5e9aa Exclude the /tests/ directory from PHP Compatibility checks
The composer.json file in WooCommerce specifies PHPUnit version 6.2.3 as a development dependency; that version of PHPUnit sets PHP 7.0 as the minimum PHP version, effectively making the minimum development version for WooCommerce to be PHP 7.0 (hooray!).

With a more modern version of PHP as the minimum requirement for developers, the code that isn't distributed with the plugin (e.g. the /tests/ directory) doesn't necessarily need to adhere to PHP 5.2-compatible coding standards. This commit removes the /tests/ directory from the scope of the PHP Compatibility checks, enabling the test suite to leverage modern (relative to PHP 5.2, anyway) features like closures, short-array syntax, and namespaces. Embracing more modern PHP in the test suite also opens up the possibilities of using libraries like Faker to populate dummy data, rather than the hard-coded helpers that exist now.

An example test enabled by this change: developers can now use closures for filter callbacks.

    add_filter( 'some_filter', function () {
        return 'the filtered value';
    }

    $this->assertEquals( 'the filtered value', my_function() );

Without a closure, this test would need to either write a one-off method in the test class or hack around it with static properties to configure the expected filter response.
2018-01-11 23:17:22 +00:00