Skip to content

Commit 4304347

Browse files
committed
fix: add MySQL init script to create test database
Creates wordpress_unit_test database on MySQL container startup. This ensures the test database exists before PHPUnit runs.
1 parent bb35422 commit 4304347

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- Create test database for PHPUnit tests
2+
CREATE DATABASE IF NOT EXISTS wordpress_unit_test;
3+
GRANT ALL PRIVILEGES ON wordpress_unit_test.* TO 'root'@'%';
4+
GRANT ALL PRIVILEGES ON wordpress_unit_test.* TO 'wordpress'@'%';
5+
FLUSH PRIVILEGES;

0 commit comments

Comments
 (0)