woocommerce/plugins/woocommerce-admin/tests/remote-inbox-notifications/mock-wc-admin-active-for-pr...

21 lines
387 B
PHP
Raw Normal View History

Add stored state between remote inbox notification runs (https://github.com/woocommerce/woocommerce-admin/pull/4260) * Fix comment and convert if..elseif to switch * Take out intermediate function * make ProductsProvider a non-static class * Adds RINDS data rule, and set up for woocommerce/woocommerce-admin#4223 # Conflicts: # src/RemoteInboxNotifications/EvaluateAndGetStatus.php * Fix rebase issues # Conflicts: # src/RemoteInboxNotifications/DataRuleProcessor.php * Split product data setup out, use product query # Conflicts: # src/RemoteInboxNotifications/RemoteInboxNotificationsEngine.php * Remove RINDS references * Remove unused products provider * Add validation to the data rule processor * Fix some issues that were failing tests * Remove unused var * Make data setup for products return the data object * Rework product query * Rename $data to $stored_state * Fix condition in query * Add time after wcadmin activation rule (https://github.com/woocommerce/woocommerce-admin/pull/4337) * Add wcadmin active for rule # Conflicts: # src/RemoteInboxNotifications/GetRuleProcessor.php * Use DAY_IN_SECONDS constant * Fix logic error * Fix test naming Co-authored-by: Rebecca Scott <me@becdetat.com> * Add order count rule (https://github.com/woocommerce/woocommerce-admin/pull/4335) * Order count rule # Conflicts: # src/RemoteInboxNotifications/GetRuleProcessor.php * Use default provider Co-authored-by: Rebecca Scott <me@becdetat.com> * Use correct 'return' value * Move back to using a SQL query to get the product count as the WC_Product_Query has issues during the product publish lifecycle. The product is initially published with a taxonomy term of uncategorized which isn't accepted by the query's filter. * Change back to using WC_Product_Query, and do prelim init via admin_init action * If there are no specs when running the engine, run the poller first then retry * Fix some failing tests * Don't perform init if we're feature toggled off * Move feature check inside RIN engine class because the feature filter isn't ready during FeaturePlugin init Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-15 23:42:35 +00:00
<?php
/**
* Mock WCAdminActiveForProvider
*
* @package WooCommerce\Tests\RemoteInboxNotifications
*/
/**
* Mock WCAdminActiveForProvider
*/
class MockWCAdminActiveForProvider {
/**
* Get the number of seconds that the store has been active.
*
* @return number Number of seconds.
*/
public function get_wcadmin_active_for_in_seconds() {
return 8 * DAY_IN_SECONDS;
}
}