You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the #18 it was noted that the DB isn't being cleaned up after each tests.
The default WP integration test case should cover this already, but I'll need to investigate.
Steps to Reproduce
Create the following test:
test("Adding a record to the db", function () {
global$wpdb;
$row = $wpdb->get_row(" SELECT * FROM {$wpdb->postmeta} WHERE meta_id=6969", ARRAY_A);
expect($row)->not()->toBeEmpty();
})->with([
function () {
global$wpdb;
$wpdb->insert($wpdb->postmeta, [
'meta_id' => 6969,
'post_id' => 9696,
'meta_key' => 'testing',
'meta_value' => 'Just a test.'
]);
}
]);
Run it twice
See the results
Expected behavior
Test should pass every time the test suite is run.
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in this repo.
Yes
The text was updated successfully, but these errors were encountered:
Describe your bug
In the #18 it was noted that the DB isn't being cleaned up after each tests.
The default WP integration test case should cover this already, but I'll need to investigate.
Steps to Reproduce
Expected behavior
Test should pass every time the test suite is run.
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in this repo.
Yes
The text was updated successfully, but these errors were encountered: