Replace static $db by private static $db in tests