mirror of
https://gh.wpcy.net/https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2026-04-28 03:09:16 +08:00
25 lines
546 B
PHP
25 lines
546 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace WooCommerce\PayPalCommerce\Tests\Integration\Traits;
|
|
|
|
trait CleansTestData
|
|
{
|
|
/**
|
|
* Clean all test data created by factories
|
|
*/
|
|
protected function cleanupTestData(): void
|
|
{
|
|
if (isset($this->order_factory)) {
|
|
$this->order_factory->cleanup();
|
|
}
|
|
|
|
if (isset($this->product_factory)) {
|
|
$this->product_factory->cleanup();
|
|
}
|
|
|
|
if (isset($this->coupon_factory)) {
|
|
$this->coupon_factory->cleanup();
|
|
}
|
|
}
|
|
}
|