mirror of
https://gh.wpcy.net/https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2026-04-26 01:14:19 +08:00
This commit adds unit tests for the Agentic Commerce ingestion functionality: - Add tests for ProductsPayload class covering simple products, variable products, and edge cases - Add tests for IngestionBatchProvider with various batch scenarios and priority handling - Add tests for SyncJob including successful syncs, error handling, and metadata updates - Add ProductsPayloadFactory to enable dependency injection in SyncJob - Add ProductStatus stub for WooCommerce enum compatibility - Update patchwork.json to support mocking of date functions in tests
57 lines
No EOL
856 B
PHP
57 lines
No EOL
856 B
PHP
<?php
|
|
|
|
namespace Automattic\WooCommerce\Enums;
|
|
|
|
/**
|
|
* Stub for WooCommerce ProductStatus enum class.
|
|
*/
|
|
final class ProductStatus {
|
|
/**
|
|
* The product is in auto-draft status.
|
|
*
|
|
* @var string
|
|
*/
|
|
public const AUTO_DRAFT = 'auto-draft';
|
|
|
|
/**
|
|
* The product is in draft status.
|
|
*
|
|
* @var string
|
|
*/
|
|
public const DRAFT = 'draft';
|
|
|
|
/**
|
|
* The product is in pending status.
|
|
*
|
|
* @var string
|
|
*/
|
|
public const PENDING = 'pending';
|
|
|
|
/**
|
|
* The product is in private status.
|
|
*
|
|
* @var string
|
|
*/
|
|
public const PRIVATE = 'private';
|
|
|
|
/**
|
|
* The product is in publish status.
|
|
*
|
|
* @var string
|
|
*/
|
|
public const PUBLISH = 'publish';
|
|
|
|
/**
|
|
* The product is in trash status.
|
|
*
|
|
* @var string
|
|
*/
|
|
public const TRASH = 'trash';
|
|
|
|
/**
|
|
* The product is in future status.
|
|
*
|
|
* @var string
|
|
*/
|
|
public const FUTURE = 'future';
|
|
} |