Summary
Add a comprehensive test suite for the bbGuild WoW plugin covering all test levels required for phpBB extension validation.
Test levels
EPV (Extension Pre-Validator)
- Ensure the extension passes
phpbb/epv checks (composer.json, file structure, coding standards)
- Add
phpbb/epv to require-dev
- CI workflow to run EPV on every push
Unit tests
wow_api.php — to_slug(), error_label(), process logic (mock API responses)
wow_provider.php — get_armor_types(), get_regions(), get_api_locales()
wow_installer.php — verify class/race/faction seed data arrays
Functional tests
battlenet_character.php — test endpoint URL construction for all methods (getCharacter, getCharacterMedia, getCharacterEquipment, getCharacterStatistics, getCharacterProfessions, getCharacterMythicKeystoneProfile, getCharacterPvPSummary, getCharacterSpecializations)
battlenet_resource.php — OAuth token caching, 401 retry, namespace header construction
sync_portraits(), sync_specs(), sync_equipment() — test with mock DB and mock API responses
Smoke tests
- Extension enables without errors
- Extension disables and re-enables without data loss
- ACP guild edit page loads with WoW guild (no PHP warnings)
- Player detail page loads for a WoW character
Integration tests
- Full guild sync flow: roster → specs → portraits → equipment
- Player detail event listener: verify all template vars are assigned
- Achievement browser: category list → achievement list → detail
Test infrastructure
- phpBB test framework (
phpbb/test-framework)
- PHPUnit configuration (
phpunit.xml.dist)
- GitHub Actions CI workflow
- Test fixtures for mock API responses
Reference
Summary
Add a comprehensive test suite for the bbGuild WoW plugin covering all test levels required for phpBB extension validation.
Test levels
EPV (Extension Pre-Validator)
phpbb/epvchecks (composer.json, file structure, coding standards)phpbb/epvtorequire-devUnit tests
wow_api.php— to_slug(), error_label(), process logic (mock API responses)wow_provider.php— get_armor_types(), get_regions(), get_api_locales()wow_installer.php— verify class/race/faction seed data arraysFunctional tests
battlenet_character.php— test endpoint URL construction for all methods (getCharacter, getCharacterMedia, getCharacterEquipment, getCharacterStatistics, getCharacterProfessions, getCharacterMythicKeystoneProfile, getCharacterPvPSummary, getCharacterSpecializations)battlenet_resource.php— OAuth token caching, 401 retry, namespace header constructionsync_portraits(),sync_specs(),sync_equipment()— test with mock DB and mock API responsesSmoke tests
Integration tests
Test infrastructure
phpbb/test-framework)phpunit.xml.dist)Reference