Skip to content

Add EPV, unit, functional, smoke, and integration tests #25

@avandenberghe

Description

@avandenberghe

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions