-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
Description
As we know that WP test suite will create any not core tables as temporary tables.
So try this MySQL snippet
CREATE TEMPORARY TABLE wp_test_credits(
customerNumber INT PRIMARY KEY,
creditLimit DEC(10,2)
);
this is what exactly WP unit tests framework does.
Then here
https://github.com/berlindb/core/blob/master/table.php#L335
You are trying to run the following mysql query
SHOW TABLES LIKE '%wp_tesssst_credits%';
and this show tables isn't working with temporary tables so the exists method will return false forever in tests, which affects some other methods.
I think if you used the following query
SHOW CREATE TABLE wp_tesssst_credits;
this should work with all tables (temp or normal)
If you agree on the idea, I can open PR for it to validate.