[WP] Unit tests fix

+ new database tests
+ database mock test