Skip to content

Commit ad66476

Browse files
author
Алексей Тихомиров
committed
fix: add explicit pause status cleanup in E2E test beforeEach hooks
1 parent d7f0fef commit ad66476

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

tests/Feature/CliIntegrationTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@
1515
define('WP_CLI', true);
1616
}
1717

18-
// Очистка всех очередей
18+
// Очистка всех очередей и статусов
1919
global $wpdb;
2020
$wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE 'wp_queue_%'");
21+
22+
// Явная очистка статуса паузы
23+
delete_site_option('wp_queue_status_default');
24+
delete_site_option('wp_queue_status_emails');
2125
});
2226

2327
afterEach(function (): void {

tests/Feature/RestApiIntegrationTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@
99
use WPQueue\WPQueue;
1010

1111
beforeEach(function (): void {
12-
// Очистка всех очередей
12+
// Очистка всех очередей и статусов
1313
global $wpdb;
1414
$wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE 'wp_queue_%'");
1515

16+
// Явная очистка статуса паузы
17+
delete_site_option('wp_queue_status_default');
18+
delete_site_option('wp_queue_status_emails');
19+
1620
// Мок для REST API
1721
global $wp_rest_server;
1822
$wp_rest_server = new \WP_REST_Server();

0 commit comments

Comments
 (0)